<commit_before>#--
# Copyright (c) 2013 RightScale, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# 'Software'), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#++

module RightScale
  module CloudApi
    module AWS
      module Route53

        # Route 53 wrapper namespace
        module Wrapper

          # Default wrapper
          module DEFAULT

            # Defines QUERY API like methods for the service
            #
            # @return [void]
            #
            # @example
            #  # no example
            #
            def self.extended(base)

              #-----------------
              # Hosted Zones
              #-----------------

              base.query_api_pattern 'CreateHostedZone', :post, 'hostedzone',
                :body => {
                  'CreateHostedZoneRequest' => {
                    'Name'             => :Name,
                    'CallerReference'  => :CallerReference,
                    'HostedZoneConfig{!remove-if-blank}' => {
                      'Comment' => :Comment
                    },
                    'DelegationSetId' => :DelegationSetId,
                    'VPC{!remove-if-blank}' => {
                      'VPCId'     => :VPCId,
                      'VPCRegion' => :VPCRegion
                    }
                  }
                },
                :defaults => {
                  :Comment         => Utils::NONE,
                  :DelegationSetId => Utils::NONE,
                  :VPCId           => Utils::NONE,
                  :VPCRegion       => Utils::NONE
                }

              base.query_api_pattern 'ListHostedZone', :get, 'hostedzone'

              base.query_api_pattern 'ListHostedZonesByName', :get, 'hostedzonesbyname'

              base.query_api_pattern 'GetHostedZone', :get, 'hostedzone/{:HostedZoneId}'

              base.query_api_pattern 'GetHostedZoneCount', :get, 'hostedzonecount'

              base.query_api_pattern 'UpdateHostedZoneComment', :post, 'hostedzone/{:HostedZoneId}',
                :body => {
                  'UpdateHostedZoneCommentRequest' => {
                    'Comment' => :Comment
                  }
                }

              base.query_api_pattern 'AssociateVPCWithHostedZone', :post, 'hostedzone/{:HostedZoneId}/associatevpc',
                :body => {
                  'AssociateVPCWithHostedZoneRequest' => {
                    'VPC{!remove-if-blank}' => {
                      'VPCId'     => :VPCId,
                      'VPCRegion' => :VPCRegion
                    },
                    'Comment' => :Comment
                  }
                },
                :defaults => {
                  :Comment => Utils::NONE,
                }

              base.query_api_pattern 'DisassociateVPCFromHostedZone', :post, 'hostedzone/{:HostedZoneId}/disassociatevpc',
                :body => {
                  'DisassociateVPCFromHostedZoneRequest' => {
                    'VPC{!remove-if-blank}' => {
                      'VPCId'     => :VPCId,
                      'VPCRegion' => :VPCRegion
                    },
                    'Comment' => :Comment
                  }
                },
                :defaults => {
                  :Comment => Utils::NONE,
                }

              base.query_api_pattern 'DeleteHostedZone', :delete, 'hostedzone/{:HostedZoneId}'

              #----------------------
              # Resource Record Sets
              #----------------------

              base.query_api_pattern 'ListResourceRecordSets', :get, 'hostedzone/{:HostedZoneId}/rrset'

              base.query_api_pattern 'GetChange', :get, 'change/{:ChangeId}'

              base.query_api_pattern 'GetGeoLocation', :get, 'geolocation'

              base.query_api_pattern 'ListGeoLocations', :get, 'geolocations'

              base.query_api_pattern 'ChangeResourceRecordSets', :post, 'hostedzone/{:HostedZoneId}/rrset',
                :body => {
                  'ChangeResourceRecordSetsRequest' => {
                    'ChangeBatch' => {
                      'Comment' => :Comment,
                      'Changes' => {
                        'Change[{:Change}]' => {
                          'Action'            => :Action,
                          'ResourceRecordSet' => {
                            'Name' => :Name,
                            'Type' => :Type,
                            'AliasTarget{!remove-if-blank}' => {
                              'HostedZoneId'         => :TargetHostedZoneId,<commit_msg>This attribute is required for the 'ChangeResourceRecordSetsRequest' API call.<commit_after>#--
# Copyright (c) 2013 RightScale, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# 'Software'), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#++

module RightScale
  module CloudApi
    module AWS
      module Route53

        # Route 53 wrapper namespace
        module Wrapper

          # Default wrapper
          module DEFAULT

            # Defines QUERY API like methods for the service
            #
            # @return [void]
            #
            # @example
            #  # no example
            #
            def self.extended(base)

              #-----------------
              # Hosted Zones
              #-----------------

              base.query_api_pattern 'CreateHostedZone', :post, 'hostedzone',
                :body => {
                  'CreateHostedZoneRequest' => {
                    'Name'             => :Name,
                    'CallerReference'  => :CallerReference,
                    'HostedZoneConfig{!remove-if-blank}' => {
                      'Comment' => :Comment
                    },
                    'DelegationSetId' => :DelegationSetId,
                    'VPC{!remove-if-blank}' => {
                      'VPCId'     => :VPCId,
                      'VPCRegion' => :VPCRegion
                    }
                  }
                },
                :defaults => {
                  :Comment         => Utils::NONE,
                  :DelegationSetId => Utils::NONE,
                  :VPCId           => Utils::NONE,
                  :VPCRegion       => Utils::NONE
                }

              base.query_api_pattern 'ListHostedZone', :get, 'hostedzone'

              base.query_api_pattern 'ListHostedZonesByName', :get, 'hostedzonesbyname'

              base.query_api_pattern 'GetHostedZone', :get, 'hostedzone/{:HostedZoneId}'

              base.query_api_pattern 'GetHostedZoneCount', :get, 'hostedzonecount'

              base.query_api_pattern 'UpdateHostedZoneComment', :post, 'hostedzone/{:HostedZoneId}',
                :body => {
                  'UpdateHostedZoneCommentRequest' => {
                    'Comment' => :Comment
                  }
                }

              base.query_api_pattern 'AssociateVPCWithHostedZone', :post, 'hostedzone/{:HostedZoneId}/associatevpc',
                :body => {
                  'AssociateVPCWithHostedZoneRequest' => {
                    'VPC{!remove-if-blank}' => {
                      'VPCId'     => :VPCId,
                      'VPCRegion' => :VPCRegion
                    },
                    'Comment' => :Comment
                  }
                },
                :defaults => {
                  :Comment => Utils::NONE,
                }

              base.query_api_pattern 'DisassociateVPCFromHostedZone', :post, 'hostedzone/{:HostedZoneId}/disassociatevpc',
                :body => {
                  'DisassociateVPCFromHostedZoneRequest' => {
                    'VPC{!remove-if-blank}' => {
                      'VPCId'     => :VPCId,
                      'VPCRegion' => :VPCRegion
                    },
                    'Comment' => :Comment
                  }
                },
                :defaults => {
                  :Comment => Utils::NONE,
                }

              base.query_api_pattern 'DeleteHostedZone', :delete, 'hostedzone/{:HostedZoneId}'

              #----------------------
              # Resource Record Sets
              #----------------------

              base.query_api_pattern 'ListResourceRecordSets', :get, 'hostedzone/{:HostedZoneId}/rrset'

              base.query_api_pattern 'GetChange', :get, 'change/{:ChangeId}'

              base.query_api_pattern 'GetGeoLocation', :get, 'geolocation'

              base.query_api_pattern 'ListGeoLocations', :get, 'geolocations'

              base.query_api_pattern 'ChangeResourceRecordSets', :post, 'hostedzone/{:HostedZoneId}/rrset',
                :body => {
                  'ChangeResourceRecordSetsRequest' => {
                    '@xmlns'      => 'https://route53.amazonaws.com/doc/2013-04-01/',
                    'ChangeBatch' => {
                      'Comment' => :Comment,
                      'Changes' => {
                        'Change[{:Change}]' => {
                          'Action'            => :Action,
                          'ResourceRecordSet' => {
                            'Name' => :Name,
                            'Type' => :Type,
                            'AliasTarget{!remove-if-blank}' => {
                              'HostedZoneId'         => :TargetHostedZoneId,
{'fraction_non_alphanumeric': 0.1113107537507861, 'fraction_numerical': 0.002335818884197287, 'mean_word_length': 1.4121343445287107, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 96, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 1}, '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': '7308198', 'n_tokens_mistral': 2919, 'n_tokens_neox': 2731, 'n_words': 673}