<commit_before># Copyright 2021 Google Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

--- !ruby/object:Provider::Terraform::Config
overrides: !ruby/object:Overrides::ResourceOverrides
  EdgeCacheKeyset: !ruby/object:Overrides::Terraform::ResourceOverride
    import_format: ["projects/{{project}}/locations/global/edgeCacheKeysets/{{name}}"]
    examples:
      - !ruby/object:Provider::Terraform::Examples
        name: "network_services_edge_cache_keyset_basic"
        primary_resource_id: "default"
        vars:
          resource_name: "default"
    properties:
      publicKeys: !ruby/object:Overrides::Terraform::PropertyOverride
        name: "public_key"
      publicKeys.value: !ruby/object:Overrides::Terraform::PropertyOverride
        sensitive: true
  EdgeCacheOrigin: !ruby/object:Overrides::Terraform::ResourceOverride
    autogen_async: true
    import_format: ["projects/{{project}}/locations/global/edgeCacheOrigins/{{name}}"]
    examples:
      - !ruby/object:Provider::Terraform::Examples
        name: "network_services_edge_cache_origin_basic"
        primary_resource_id: "default"
        vars:
          resource_name: "my-origin"
        ignore_read_extra:
         - "timeout"
      - !ruby/object:Provider::Terraform::Examples
        name: "network_services_edge_cache_origin_advanced"
        primary_resource_id: "default"
        vars:
          resource_name: "my-origin"
          resource_name_2: "my-fallback"
        ignore_read_extra:
         - "timeout"
    properties:
      protocol: !ruby/object:Overrides::Terraform::PropertyOverride
        default_from_api: true
      maxAttempts: !ruby/object:Overrides::Terraform::PropertyOverride
        validation: !ruby/object:Provider::Terraform::Validation
         function: 'validation.IntBetween(0, 4)'
      port: !ruby/object:Overrides::Terraform::PropertyOverride
        default_from_api: true
      retryConditions: !ruby/object:Overrides::Terraform::PropertyOverride
        default_from_api: true
      timeout: !ruby/object:Overrides::Terraform::PropertyOverride
        # We don't support ignore_read on nested fields
        ignore_read: true # b/192698242
        custom_flatten: "templates/terraform/custom_flatten/network_services_timeout_mirror.go.erb"
  EdgeCacheService: !ruby/object:Overrides::Terraform::ResourceOverride
    docs: !ruby/object:Provider::Terraform::Docs #
      warning: |
        These resources require allow-listing to use, and are not openly available to all Cloud customers. Engage with your Cloud account team to discuss how to onboard.
    autogen_async: true
    import_format: ["projects/{{project}}/locations/global/edgeCacheServices/{{name}}"]
    examples:
      - !ruby/object:Provider::Terraform::Examples
        name: "network_services_edge_cache_service_basic"
        primary_resource_id: "instance"
        vars:
          bucket_name: "my-bucket"
          origin_name: "my-origin"
          service_name: "my-service"
      - !ruby/object:Provider::Terraform::Examples
        name: "network_services_edge_cache_service_advanced"
        primary_resource_id: "instance"
        vars:
          bucket_name: "my-bucket"
          origin_name: "my-origin"
          origin_google: "origin-google"
          service_name: "my-service"
    properties:
      disableQuic: !ruby/object:Overrides::Terraform::PropertyOverride
        default_from_api: true
      requireTls: !ruby/object:Overrides::Terraform::PropertyOverride
        default_from_api: true
      logConfig.enable: !ruby/object:Overrides::Terraform::PropertyOverride
        default_from_api: true
      routing.hostRules: !ruby/object:Overrides::Terraform::PropertyOverride
        name: "host_rule"
      routing.pathMatchers: !ruby/object:Overrides::Terraform::PropertyOverride
        name: "path_matcher"
      routing.pathMatchers.routeRules: !ruby/object:Overrides::Terraform::PropertyOverride
        name: "route_rule"
      routing.pathMatchers.routeRules.matchRules: !ruby/object:Overrides::Terraform::PropertyOverride
        name: "match_rule"
      routing.pathMatchers.routeRules.matchRules.ignoreCase: !ruby/object:Overrides::Terraform::PropertyOverride
        default_from_api: true
      routing.pathMatchers.routeRules.matchRules.headerMatches: !ruby/object:Overrides::Terraform::PropertyOverride
        name: "header_match"
      routing.pathMatchers.routeRules.matchRules.queryParameterMatches: !ruby/object:Overrides::Terraform::PropertyOverride
        name: "query_parameter_match"
      routing.pathMatchers.routeRules.matchRules.headerMatches.invertMatch: !ruby/object:Overrides::Terraform::PropertyOverride
        default_from_api: true
      routing.pathMatchers.routeRules.headerAction.requestHeadersToAdd: !ruby/object:Overrides::Terraform::PropertyOverride
        name: "request_header_to_add"
      routing.pathMatchers.routeRules.headerAction.responseHeadersToAdd: !ruby/object:Overrides::Terraform::PropertyOverride
        name: "response_header_to_add"
      routing.pathMatchers.routeRules.headerAction.requestHeadersToRemove: !ruby/object:Overrides::Terraform::PropertyOverride
        name: "request_header_to_remove"
      routing.pathMatchers.routeRules.headerAction.responseHeadersToRemove: !ruby/object:Overrides::Terraform::PropertyOverride
        name: "response_header_to_remove"
      routing.pathMatchers.routeRules.headerAction.requestHeadersToAdd.replace: !ruby/object:Overrides::Terraform::PropertyOverride
        default_from_api: true
      routing.pathMatchers.routeRules.headerAction.responseHeadersToAdd.replace: !ruby/object:Overrides::Terraform::PropertyOverride
        default_from_api: true
      routing.pathMatchers.routeRules.routeAction.cdnPolicy.cacheMode: !ruby/object:Overrides::Terraform::PropertyOverride
        default_from_api: true
      routing.pathMatchers.routeRules.routeAction.cdnPolicy.defaultTtl: !ruby/object:Overrides::Terraform::PropertyOverride
        default_from_api: true
      routing.pathMatchers.routeRules.routeAction.cdnPolicy.maxTtl: !ruby/object:Overrides::Terraform::PropertyOverride
        default_from_api: true<commit_msg>update origin field to use self link or name (#5243)<commit_after># Copyright 2021 Google Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

--- !ruby/object:Provider::Terraform::Config
overrides: !ruby/object:Overrides::ResourceOverrides
  EdgeCacheKeyset: !ruby/object:Overrides::Terraform::ResourceOverride
    import_format: ["projects/{{project}}/locations/global/edgeCacheKeysets/{{name}}"]
    examples:
      - !ruby/object:Provider::Terraform::Examples
        name: "network_services_edge_cache_keyset_basic"
        primary_resource_id: "default"
        vars:
          resource_name: "default"
    properties:
      publicKeys: !ruby/object:Overrides::Terraform::PropertyOverride
        name: "public_key"
      publicKeys.value: !ruby/object:Overrides::Terraform::PropertyOverride
        sensitive: true
  EdgeCacheOrigin: !ruby/object:Overrides::Terraform::ResourceOverride
    autogen_async: true
    import_format: ["projects/{{project}}/locations/global/edgeCacheOrigins/{{name}}"]
    examples:
      - !ruby/object:Provider::Terraform::Examples
        name: "network_services_edge_cache_origin_basic"
        primary_resource_id: "default"
        vars:
          resource_name: "my-origin"
        ignore_read_extra:
         - "timeout"
      - !ruby/object:Provider::Terraform::Examples
        name: "network_services_edge_cache_origin_advanced"
        primary_resource_id: "default"
        vars:
          resource_name: "my-origin"
          resource_name_2: "my-fallback"
        ignore_read_extra:
         - "timeout"
    properties:
      failoverOrigin: !ruby/object:Overrides::Terraform::PropertyOverride
        diff_suppress_func: 'compareResourceNames'
      protocol: !ruby/object:Overrides::Terraform::PropertyOverride
        default_from_api: true
      maxAttempts: !ruby/object:Overrides::Terraform::PropertyOverride
        validation: !ruby/object:Provider::Terraform::Validation
         function: 'validation.IntBetween(0, 4)'
      port: !ruby/object:Overrides::Terraform::PropertyOverride
        default_from_api: true
      retryConditions: !ruby/object:Overrides::Terraform::PropertyOverride
        default_from_api: true
      timeout: !ruby/object:Overrides::Terraform::PropertyOverride
        # We don't support ignore_read on nested fields
        ignore_read: true # b/192698242
        custom_flatten: "templates/terraform/custom_flatten/network_services_timeout_mirror.go.erb"
  EdgeCacheService: !ruby/object:Overrides::Terraform::ResourceOverride
    docs: !ruby/object:Provider::Terraform::Docs #
      warning: |
        These resources require allow-listing to use, and are not openly available to all Cloud customers. Engage with your Cloud account team to discuss how to onboard.
    autogen_async: true
    import_format: ["projects/{{project}}/locations/global/edgeCacheServices/{{name}}"]
    examples:
      - !ruby/object:Provider::Terraform::Examples
        name: "network_services_edge_cache_service_basic"
        primary_resource_id: "instance"
        vars:
          bucket_name: "my-bucket"
          origin_name: "my-origin"
          service_name: "my-service"
      - !ruby/object:Provider::Terraform::Examples
        name: "network_services_edge_cache_service_advanced"
        primary_resource_id: "instance"
        vars:
          bucket_name: "my-bucket"
          origin_name: "my-origin"
          origin_google: "origin-google"
          service_name: "my-service"
    properties:
      disableQuic: !ruby/object:Overrides::Terraform::PropertyOverride
        default_from_api: true
      requireTls: !ruby/object:Overrides::Terraform::PropertyOverride
        default_from_api: true
      logConfig.enable: !ruby/object:Overrides::Terraform::PropertyOverride
        default_from_api: true
      routing.hostRules: !ruby/object:Overrides::Terraform::PropertyOverride
        name: "host_rule"
      routing.pathMatchers: !ruby/object:Overrides::Terraform::PropertyOverride
        name: "path_matcher"
      routing.pathMatchers.routeRules: !ruby/object:Overrides::Terraform::PropertyOverride
        name: "route_rule"
      routing.pathMatchers.routeRules.matchRules: !ruby/object:Overrides::Terraform::PropertyOverride
        name: "match_rule"
      routing.pathMatchers.routeRules.matchRules.ignoreCase: !ruby/object:Overrides::Terraform::PropertyOverride
        default_from_api: true
      routing.pathMatchers.routeRules.matchRules.headerMatches: !ruby/object:Overrides::Terraform::PropertyOverride
        name: "header_match"
      routing.pathMatchers.routeRules.matchRules.queryParameterMatches: !ruby/object:Overrides::Terraform::PropertyOverride
        name: "query_parameter_match"
      routing.pathMatchers.routeRules.matchRules.headerMatches.invertMatch: !ruby/object:Overrides::Terraform::PropertyOverride
        default_from_api: true
      routing.pathMatchers.routeRules.headerAction.requestHeadersToAdd: !ruby/object:Overrides::Terraform::PropertyOverride
        name: "request_header_to_add"
      routing.pathMatchers.routeRules.headerAction.responseHeadersToAdd: !ruby/object:Overrides::Terraform::PropertyOverride
        name: "response_header_to_add"
      routing.pathMatchers.routeRules.headerAction.requestHeadersToRemove: !ruby/object:Overrides::Terraform::PropertyOverride
        name: "request_header_to_remove"
      routing.pathMatchers.routeRules.headerAction.responseHeadersToRemove: !ruby/object:Overrides::Terraform::PropertyOverride
        name: "response_header_to_remove"
      routing.pathMatchers.routeRules.headerAction.requestHeadersToAdd.replace: !ruby/object:Overrides::Terraform::PropertyOverride
        default_from_api: true
      routing.pathMatchers.routeRules.headerAction.responseHeadersToAdd.replace: !ruby/object:Overrides::Terraform::PropertyOverride
        default_from_api: true
      routing.pathMatchers.routeRules.origin: !ruby/object:Overrides::Terraform::PropertyOverride
        diff_suppress_func: 'compareSelfLinkOrResourceName'
      routing.pathMatchers.routeRules.routeAction.cdnPolicy.cacheMode: !ruby/object:Overrides::Terraform::PropertyOverride
        default_from_api: true
      routing.pathMatchers.routeRules.routeAction.cdnPolicy.defaultTtl: !ruby/object:Overrides::Terraform::PropertyOverride
        default_from_api: true
      routing.pathMatchers.routeRules.routeAction.cdnPolicy.maxTtl: !ruby/object:Overrides::Terraform::PropertyOverride
        default_from_api: true
{'fraction_non_alphanumeric': 0.09629520729197295, 'fraction_numerical': 0.003234342840341076, 'mean_word_length': 4.250868390582786, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6878580', 'n_tokens_mistral': 3975, 'n_tokens_neox': 3896, 'n_words': 644}