From 86e3817a0168321712efc1cc91e9e1a441cea06a Mon Sep 17 00:00:00 2001 From: Vishrut Shah Date: Mon, 17 Oct 2016 15:57:52 -0700 Subject: [PATCH] Update azure_mgmt_notification_hub to api version 2016_03_01 --- Rakefile | 2 +- .../generated/azure_mgmt_notification_hubs.rb | 25 +- .../models/adm_credential.rb | 32 +- .../models/adm_credential_properties.rb | 64 ---- .../models/apns_credential.rb | 42 ++- .../models/apns_credential_properties.rb | 74 ---- .../models/baidu_credential.rb | 32 +- .../models/baidu_credential_properties.rb | 64 ---- .../models/check_availability_parameters.rb | 45 ++- ...source.rb => check_availability_result.rb} | 52 ++- .../models/gcm_credential.rb | 22 +- .../models/gcm_credential_properties.rb | 54 --- .../models/mpns_credential.rb | 32 +- .../models/mpns_credential_properties.rb | 64 ---- .../namespace_create_or_update_parameters.rb | 156 +++++++- .../models/namespace_list_result.rb | 8 +- .../models/namespace_patch_parameters.rb | 62 ++++ .../models/namespace_properties.rb | 153 -------- .../models/namespace_resource.rb | 150 ++++++-- ...ication_hub_create_or_update_parameters.rb | 149 +++++++- .../models/notification_hub_list_result.rb | 8 +- .../models/notification_hub_resource.rb | 145 ++++++-- ...perties.rb => pns_credentials_resource.rb} | 76 ++-- .../models/policykey_resource.rb | 46 +++ .../models/resource_list_keys.rb | 37 +- ...zation_rule_create_or_update_parameters.rb | 55 ++- ...d_access_authorization_rule_list_result.rb | 8 +- ...ed_access_authorization_rule_properties.rb | 81 ----- ...ared_access_authorization_rule_resource.rb | 64 ++-- .../models/sku.rb | 85 +++++ .../models/sku_name.rb | 17 + .../models/wns_credential.rb | 32 +- .../models/wns_credential_properties.rb | 64 ---- .../namespaces.rb | 334 ++++++++++++------ .../notification_hubs.rb | 135 ++++++- .../notification_hubs_management_client.rb | 2 +- swagger_to_sdk_config.json | 2 +- 37 files changed, 1493 insertions(+), 980 deletions(-) delete mode 100644 management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/adm_credential_properties.rb delete mode 100644 management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/apns_credential_properties.rb delete mode 100644 management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/baidu_credential_properties.rb rename management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/{check_availability_resource.rb => check_availability_result.rb} (72%) delete mode 100644 management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/gcm_credential_properties.rb delete mode 100644 management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/mpns_credential_properties.rb create mode 100644 management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/namespace_patch_parameters.rb delete mode 100644 management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/namespace_properties.rb rename management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/{notification_hub_properties.rb => pns_credentials_resource.rb} (65%) create mode 100644 management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/policykey_resource.rb create mode 100644 management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/sku.rb create mode 100644 management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/sku_name.rb delete mode 100644 management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/wns_credential_properties.rb diff --git a/Rakefile b/Rakefile index d4741c50a..0563daf7a 100644 --- a/Rakefile +++ b/Rakefile @@ -263,7 +263,7 @@ REGEN_METADATA = { tag: 'arm_netw' }, azure_mgmt_notification_hubs: { - spec_uri: 'https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/arm-notificationhubs/2014-09-01/swagger/notificationhubs.json', + spec_uri: 'https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/arm-notificationhubs/2016-03-01/swagger/notificationhubs.json', ns: 'Azure::ARM::NotificationHubs', version: version, tag: 'arm_noti' diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs.rb index 3546c4a85..ff81a0470 100644 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs.rb @@ -26,32 +26,29 @@ module Azure::ARM::NotificationHubs module Models autoload :CheckAvailabilityParameters, 'generated/azure_mgmt_notification_hubs/models/check_availability_parameters.rb' - autoload :CheckAvailabilityResource, 'generated/azure_mgmt_notification_hubs/models/check_availability_resource.rb' - autoload :NamespaceProperties, 'generated/azure_mgmt_notification_hubs/models/namespace_properties.rb' - autoload :NamespaceCreateOrUpdateParameters, 'generated/azure_mgmt_notification_hubs/models/namespace_create_or_update_parameters.rb' - autoload :NamespaceResource, 'generated/azure_mgmt_notification_hubs/models/namespace_resource.rb' + autoload :Sku, 'generated/azure_mgmt_notification_hubs/models/sku.rb' + autoload :NamespacePatchParameters, 'generated/azure_mgmt_notification_hubs/models/namespace_patch_parameters.rb' autoload :SharedAccessAuthorizationRuleProperties, 'generated/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_properties.rb' - autoload :SharedAccessAuthorizationRuleCreateOrUpdateParameters, 'generated/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_create_or_update_parameters.rb' - autoload :SharedAccessAuthorizationRuleResource, 'generated/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_resource.rb' autoload :NamespaceListResult, 'generated/azure_mgmt_notification_hubs/models/namespace_list_result.rb' autoload :SharedAccessAuthorizationRuleListResult, 'generated/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_list_result.rb' autoload :ResourceListKeys, 'generated/azure_mgmt_notification_hubs/models/resource_list_keys.rb' - autoload :ApnsCredentialProperties, 'generated/azure_mgmt_notification_hubs/models/apns_credential_properties.rb' + autoload :PolicykeyResource, 'generated/azure_mgmt_notification_hubs/models/policykey_resource.rb' autoload :ApnsCredential, 'generated/azure_mgmt_notification_hubs/models/apns_credential.rb' - autoload :WnsCredentialProperties, 'generated/azure_mgmt_notification_hubs/models/wns_credential_properties.rb' autoload :WnsCredential, 'generated/azure_mgmt_notification_hubs/models/wns_credential.rb' - autoload :GcmCredentialProperties, 'generated/azure_mgmt_notification_hubs/models/gcm_credential_properties.rb' autoload :GcmCredential, 'generated/azure_mgmt_notification_hubs/models/gcm_credential.rb' - autoload :MpnsCredentialProperties, 'generated/azure_mgmt_notification_hubs/models/mpns_credential_properties.rb' autoload :MpnsCredential, 'generated/azure_mgmt_notification_hubs/models/mpns_credential.rb' - autoload :AdmCredentialProperties, 'generated/azure_mgmt_notification_hubs/models/adm_credential_properties.rb' autoload :AdmCredential, 'generated/azure_mgmt_notification_hubs/models/adm_credential.rb' - autoload :BaiduCredentialProperties, 'generated/azure_mgmt_notification_hubs/models/baidu_credential_properties.rb' autoload :BaiduCredential, 'generated/azure_mgmt_notification_hubs/models/baidu_credential.rb' - autoload :NotificationHubProperties, 'generated/azure_mgmt_notification_hubs/models/notification_hub_properties.rb' + autoload :NotificationHubListResult, 'generated/azure_mgmt_notification_hubs/models/notification_hub_list_result.rb' + autoload :CheckAvailabilityResult, 'generated/azure_mgmt_notification_hubs/models/check_availability_result.rb' + autoload :NamespaceCreateOrUpdateParameters, 'generated/azure_mgmt_notification_hubs/models/namespace_create_or_update_parameters.rb' + autoload :NamespaceResource, 'generated/azure_mgmt_notification_hubs/models/namespace_resource.rb' + autoload :SharedAccessAuthorizationRuleCreateOrUpdateParameters, 'generated/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_create_or_update_parameters.rb' + autoload :SharedAccessAuthorizationRuleResource, 'generated/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_resource.rb' autoload :NotificationHubCreateOrUpdateParameters, 'generated/azure_mgmt_notification_hubs/models/notification_hub_create_or_update_parameters.rb' autoload :NotificationHubResource, 'generated/azure_mgmt_notification_hubs/models/notification_hub_resource.rb' - autoload :NotificationHubListResult, 'generated/azure_mgmt_notification_hubs/models/notification_hub_list_result.rb' + autoload :PnsCredentialsResource, 'generated/azure_mgmt_notification_hubs/models/pns_credentials_resource.rb' + autoload :SkuName, 'generated/azure_mgmt_notification_hubs/models/sku_name.rb' autoload :NamespaceType, 'generated/azure_mgmt_notification_hubs/models/namespace_type.rb' autoload :AccessRights, 'generated/azure_mgmt_notification_hubs/models/access_rights.rb' end diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/adm_credential.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/adm_credential.rb index af73e6c84..afd0b19a4 100644 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/adm_credential.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/adm_credential.rb @@ -12,9 +12,14 @@ module Azure::ARM::NotificationHubs include MsRestAzure - # @return [AdmCredentialProperties] Gets or sets properties of - # NotificationHub AdmCredential. - attr_accessor :properties + # @return [String] The client identifier. + attr_accessor :client_id + + # @return [String] The credential secret access key. + attr_accessor :client_secret + + # @return [String] The URL of the authorization token. + attr_accessor :auth_token_url # @@ -29,12 +34,25 @@ module Azure::ARM::NotificationHubs name: 'Composite', class_name: 'AdmCredential', model_properties: { - properties: { + client_id: { required: false, - serialized_name: 'properties', + serialized_name: 'properties.clientId', type: { - name: 'Composite', - class_name: 'AdmCredentialProperties' + name: 'String' + } + }, + client_secret: { + required: false, + serialized_name: 'properties.clientSecret', + type: { + name: 'String' + } + }, + auth_token_url: { + required: false, + serialized_name: 'properties.authTokenUrl', + type: { + name: 'String' } } } diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/adm_credential_properties.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/adm_credential_properties.rb deleted file mode 100644 index 351b94535..000000000 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/adm_credential_properties.rb +++ /dev/null @@ -1,64 +0,0 @@ -# encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0 -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. - -module Azure::ARM::NotificationHubs - module Models - # - # Description of a NotificationHub AdmCredential. - # - class AdmCredentialProperties - - include MsRestAzure - - # @return [String] Gets or sets the client identifier. - attr_accessor :client_id - - # @return [String] Gets or sets the credential secret access key. - attr_accessor :client_secret - - # @return [String] Gets or sets the URL of the authorization token. - attr_accessor :auth_token_url - - - # - # Mapper for AdmCredentialProperties class as Ruby Hash. - # This will be used for serialization/deserialization. - # - def self.mapper() - { - required: false, - serialized_name: 'AdmCredentialProperties', - type: { - name: 'Composite', - class_name: 'AdmCredentialProperties', - model_properties: { - client_id: { - required: false, - serialized_name: 'clientId', - type: { - name: 'String' - } - }, - client_secret: { - required: false, - serialized_name: 'clientSecret', - type: { - name: 'String' - } - }, - auth_token_url: { - required: false, - serialized_name: 'authTokenUrl', - type: { - name: 'String' - } - } - } - } - } - end - end - end -end diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/apns_credential.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/apns_credential.rb index 90130e12a..0a44428a0 100644 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/apns_credential.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/apns_credential.rb @@ -12,9 +12,17 @@ module Azure::ARM::NotificationHubs include MsRestAzure - # @return [ApnsCredentialProperties] Gets or sets properties of - # NotificationHub ApnsCredential. - attr_accessor :properties + # @return [String] The APNS certificate. + attr_accessor :apns_certificate + + # @return [String] The certificate key. + attr_accessor :certificate_key + + # @return [String] The endpoint of this credential. + attr_accessor :endpoint + + # @return [String] The Apns certificate Thumbprint + attr_accessor :thumbprint # @@ -29,12 +37,32 @@ module Azure::ARM::NotificationHubs name: 'Composite', class_name: 'ApnsCredential', model_properties: { - properties: { + apns_certificate: { required: false, - serialized_name: 'properties', + serialized_name: 'properties.apnsCertificate', type: { - name: 'Composite', - class_name: 'ApnsCredentialProperties' + name: 'String' + } + }, + certificate_key: { + required: false, + serialized_name: 'properties.certificateKey', + type: { + name: 'String' + } + }, + endpoint: { + required: false, + serialized_name: 'properties.endpoint', + type: { + name: 'String' + } + }, + thumbprint: { + required: false, + serialized_name: 'properties.thumbprint', + type: { + name: 'String' } } } diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/apns_credential_properties.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/apns_credential_properties.rb deleted file mode 100644 index 8e96c565c..000000000 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/apns_credential_properties.rb +++ /dev/null @@ -1,74 +0,0 @@ -# encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0 -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. - -module Azure::ARM::NotificationHubs - module Models - # - # Description of a NotificationHub ApnsCredential. - # - class ApnsCredentialProperties - - include MsRestAzure - - # @return [String] Gets or sets the APNS certificate. - attr_accessor :apns_certificate - - # @return [String] Gets or sets the certificate key. - attr_accessor :certificate_key - - # @return [String] Gets or sets the endpoint of this credential. - attr_accessor :endpoint - - # @return [String] Gets or sets the Apns certificate Thumbprint - attr_accessor :thumbprint - - - # - # Mapper for ApnsCredentialProperties class as Ruby Hash. - # This will be used for serialization/deserialization. - # - def self.mapper() - { - required: false, - serialized_name: 'ApnsCredentialProperties', - type: { - name: 'Composite', - class_name: 'ApnsCredentialProperties', - model_properties: { - apns_certificate: { - required: false, - serialized_name: 'apnsCertificate', - type: { - name: 'String' - } - }, - certificate_key: { - required: false, - serialized_name: 'certificateKey', - type: { - name: 'String' - } - }, - endpoint: { - required: false, - serialized_name: 'endpoint', - type: { - name: 'String' - } - }, - thumbprint: { - required: false, - serialized_name: 'thumbprint', - type: { - name: 'String' - } - } - } - } - } - end - end - end -end diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/baidu_credential.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/baidu_credential.rb index 607568a3b..bc01dc49c 100644 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/baidu_credential.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/baidu_credential.rb @@ -12,9 +12,14 @@ module Azure::ARM::NotificationHubs include MsRestAzure - # @return [BaiduCredentialProperties] Gets or sets properties of - # NotificationHub BaiduCredential. - attr_accessor :properties + # @return [String] Baidu Api Key. + attr_accessor :baidu_api_key + + # @return [String] Baidu Endpoint. + attr_accessor :baidu_end_point + + # @return [String] Baidu Secret Key + attr_accessor :baidu_secret_key # @@ -29,12 +34,25 @@ module Azure::ARM::NotificationHubs name: 'Composite', class_name: 'BaiduCredential', model_properties: { - properties: { + baidu_api_key: { required: false, - serialized_name: 'properties', + serialized_name: 'properties.baiduApiKey', type: { - name: 'Composite', - class_name: 'BaiduCredentialProperties' + name: 'String' + } + }, + baidu_end_point: { + required: false, + serialized_name: 'properties.baiduEndPoint', + type: { + name: 'String' + } + }, + baidu_secret_key: { + required: false, + serialized_name: 'properties.baiduSecretKey', + type: { + name: 'String' } } } diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/baidu_credential_properties.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/baidu_credential_properties.rb deleted file mode 100644 index d48de3b64..000000000 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/baidu_credential_properties.rb +++ /dev/null @@ -1,64 +0,0 @@ -# encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0 -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. - -module Azure::ARM::NotificationHubs - module Models - # - # Description of a NotificationHub BaiduCredential. - # - class BaiduCredentialProperties - - include MsRestAzure - - # @return [String] Get or Set Baidu Api Key. - attr_accessor :baidu_api_key - - # @return [String] Get or Set Baidu Endpoint. - attr_accessor :baidu_end_point - - # @return [String] Get or Set Baidu Secret Key - attr_accessor :baidu_secret_key - - - # - # Mapper for BaiduCredentialProperties class as Ruby Hash. - # This will be used for serialization/deserialization. - # - def self.mapper() - { - required: false, - serialized_name: 'BaiduCredentialProperties', - type: { - name: 'Composite', - class_name: 'BaiduCredentialProperties', - model_properties: { - baidu_api_key: { - required: false, - serialized_name: 'baiduApiKey', - type: { - name: 'String' - } - }, - baidu_end_point: { - required: false, - serialized_name: 'baiduEndPoint', - type: { - name: 'String' - } - }, - baidu_secret_key: { - required: false, - serialized_name: 'baiduSecretKey', - type: { - name: 'String' - } - } - } - } - } - end - end - end -end diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/check_availability_parameters.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/check_availability_parameters.rb index 04d3327f5..d7bbd1da5 100644 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/check_availability_parameters.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/check_availability_parameters.rb @@ -13,17 +13,26 @@ module Azure::ARM::NotificationHubs include MsRestAzure - # @return [String] Gets or sets name + # @return [String] Resource Id + attr_accessor :id + + # @return [String] Resource name attr_accessor :name - # @return [String] Gets or sets location. + # @return [String] Resource type + attr_accessor :type + + # @return [String] Resource location attr_accessor :location - # @return [Hash{String => String}] Gets or sets tags. + # @return [Hash{String => String}] Resource tags attr_accessor :tags - # @return [Boolean] Gets or sets true if the name is available and can - # be used to create new Namespace/NotificationHub. Otherwise false. + # @return [Sku] The sku of the created namespace + attr_accessor :sku + + # @return [Boolean] True if the name is available and can be used to + # create new Namespace/NotificationHub. Otherwise false. attr_accessor :is_availiable @@ -39,6 +48,14 @@ module Azure::ARM::NotificationHubs name: 'Composite', class_name: 'CheckAvailabilityParameters', model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, name: { required: true, serialized_name: 'name', @@ -46,8 +63,16 @@ module Azure::ARM::NotificationHubs name: 'String' } }, - location: { + type: { required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: true, serialized_name: 'location', type: { name: 'String' @@ -67,6 +92,14 @@ module Azure::ARM::NotificationHubs } } }, + sku: { + required: false, + serialized_name: 'sku', + type: { + name: 'Composite', + class_name: 'Sku' + } + }, is_availiable: { required: false, serialized_name: 'isAvailiable', diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/check_availability_resource.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/check_availability_result.rb similarity index 72% rename from management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/check_availability_resource.rb rename to management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/check_availability_result.rb index 461434d6c..94b64bddf 100644 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/check_availability_resource.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/check_availability_result.rb @@ -8,58 +8,38 @@ module Azure::ARM::NotificationHubs # # Description of a CheckAvailibility resource. # - class CheckAvailabilityResource + class CheckAvailabilityResult < MsRestAzure::Resource include MsRestAzure - # @return [String] Gets or sets the id - attr_accessor :id - - # @return [String] Gets or sets datacenter location - attr_accessor :location - - # @return [String] Gets or sets name - attr_accessor :name - - # @return [String] Gets or sets resource type - attr_accessor :type - - # @return [Hash{String => String}] Gets or sets tags - attr_accessor :tags - - # @return [Boolean] Gets or sets true if the name is available and can - # be used to create new Namespace/NotificationHub. Otherwise false. + # @return [Boolean] True if the name is available and can be used to + # create new Namespace/NotificationHub. Otherwise false. attr_accessor :is_availiable # - # Mapper for CheckAvailabilityResource class as Ruby Hash. + # Mapper for CheckAvailabilityResult class as Ruby Hash. # This will be used for serialization/deserialization. # def self.mapper() { required: false, - serialized_name: 'CheckAvailabilityResource', + serialized_name: 'CheckAvailabilityResult', type: { name: 'Composite', - class_name: 'CheckAvailabilityResource', + class_name: 'CheckAvailabilityResult', model_properties: { id: { required: false, + read_only: true, serialized_name: 'id', type: { name: 'String' } }, - location: { - required: false, - serialized_name: 'location', - type: { - name: 'String' - } - }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -67,11 +47,19 @@ module Azure::ARM::NotificationHubs }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' } }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, tags: { required: false, serialized_name: 'tags', @@ -86,6 +74,14 @@ module Azure::ARM::NotificationHubs } } }, + sku: { + required: false, + serialized_name: 'sku', + type: { + name: 'Composite', + class_name: 'Sku' + } + }, is_availiable: { required: false, serialized_name: 'isAvailiable', diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/gcm_credential.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/gcm_credential.rb index 0d6f44c97..8c5256779 100644 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/gcm_credential.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/gcm_credential.rb @@ -12,9 +12,11 @@ module Azure::ARM::NotificationHubs include MsRestAzure - # @return [GcmCredentialProperties] Gets or sets properties of - # NotificationHub GcmCredential. - attr_accessor :properties + # @return [String] The GCM endpoint. + attr_accessor :gcm_endpoint + + # @return [String] The Google API key. + attr_accessor :google_api_key # @@ -29,12 +31,18 @@ module Azure::ARM::NotificationHubs name: 'Composite', class_name: 'GcmCredential', model_properties: { - properties: { + gcm_endpoint: { required: false, - serialized_name: 'properties', + serialized_name: 'properties.gcmEndpoint', type: { - name: 'Composite', - class_name: 'GcmCredentialProperties' + name: 'String' + } + }, + google_api_key: { + required: false, + serialized_name: 'properties.googleApiKey', + type: { + name: 'String' } } } diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/gcm_credential_properties.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/gcm_credential_properties.rb deleted file mode 100644 index d69a2623b..000000000 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/gcm_credential_properties.rb +++ /dev/null @@ -1,54 +0,0 @@ -# encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0 -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. - -module Azure::ARM::NotificationHubs - module Models - # - # Description of a NotificationHub GcmCredential. - # - class GcmCredentialProperties - - include MsRestAzure - - # @return [String] Gets or sets the GCM endpoint. - attr_accessor :gcm_endpoint - - # @return [String] Gets or sets the Google API key. - attr_accessor :google_api_key - - - # - # Mapper for GcmCredentialProperties class as Ruby Hash. - # This will be used for serialization/deserialization. - # - def self.mapper() - { - required: false, - serialized_name: 'GcmCredentialProperties', - type: { - name: 'Composite', - class_name: 'GcmCredentialProperties', - model_properties: { - gcm_endpoint: { - required: false, - serialized_name: 'gcmEndpoint', - type: { - name: 'String' - } - }, - google_api_key: { - required: false, - serialized_name: 'googleApiKey', - type: { - name: 'String' - } - } - } - } - } - end - end - end -end diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/mpns_credential.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/mpns_credential.rb index dccbe19bb..2fab7c416 100644 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/mpns_credential.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/mpns_credential.rb @@ -12,9 +12,14 @@ module Azure::ARM::NotificationHubs include MsRestAzure - # @return [MpnsCredentialProperties] Gets or sets properties of - # NotificationHub MpnsCredential. - attr_accessor :properties + # @return [String] The MPNS certificate. + attr_accessor :mpns_certificate + + # @return [String] The certificate key for this credential. + attr_accessor :certificate_key + + # @return [String] The Mpns certificate Thumbprint + attr_accessor :thumbprint # @@ -29,12 +34,25 @@ module Azure::ARM::NotificationHubs name: 'Composite', class_name: 'MpnsCredential', model_properties: { - properties: { + mpns_certificate: { required: false, - serialized_name: 'properties', + serialized_name: 'properties.mpnsCertificate', type: { - name: 'Composite', - class_name: 'MpnsCredentialProperties' + name: 'String' + } + }, + certificate_key: { + required: false, + serialized_name: 'properties.certificateKey', + type: { + name: 'String' + } + }, + thumbprint: { + required: false, + serialized_name: 'properties.thumbprint', + type: { + name: 'String' } } } diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/mpns_credential_properties.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/mpns_credential_properties.rb deleted file mode 100644 index 35f785997..000000000 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/mpns_credential_properties.rb +++ /dev/null @@ -1,64 +0,0 @@ -# encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0 -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. - -module Azure::ARM::NotificationHubs - module Models - # - # Description of a NotificationHub MpnsCredential. - # - class MpnsCredentialProperties - - include MsRestAzure - - # @return [String] Gets or sets the MPNS certificate. - attr_accessor :mpns_certificate - - # @return [String] Gets or sets the certificate key for this credential. - attr_accessor :certificate_key - - # @return [String] Gets or sets the Mpns certificate Thumbprint - attr_accessor :thumbprint - - - # - # Mapper for MpnsCredentialProperties class as Ruby Hash. - # This will be used for serialization/deserialization. - # - def self.mapper() - { - required: false, - serialized_name: 'MpnsCredentialProperties', - type: { - name: 'Composite', - class_name: 'MpnsCredentialProperties', - model_properties: { - mpns_certificate: { - required: false, - serialized_name: 'mpnsCertificate', - type: { - name: 'String' - } - }, - certificate_key: { - required: false, - serialized_name: 'certificateKey', - type: { - name: 'String' - } - }, - thumbprint: { - required: false, - serialized_name: 'thumbprint', - type: { - name: 'String' - } - } - } - } - } - end - end - end -end diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/namespace_create_or_update_parameters.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/namespace_create_or_update_parameters.rb index 8452dc240..4dd793c05 100644 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/namespace_create_or_update_parameters.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/namespace_create_or_update_parameters.rb @@ -8,18 +8,50 @@ module Azure::ARM::NotificationHubs # # Parameters supplied to the CreateOrUpdate Namespace operation. # - class NamespaceCreateOrUpdateParameters + class NamespaceCreateOrUpdateParameters < MsRestAzure::Resource include MsRestAzure - # @return [String] Gets or sets Namespace data center location. - attr_accessor :location + # @return [String] The name of the namespace. + attr_accessor :namespace_create_or_update_parameters_name - # @return [Hash{String => String}] Gets or sets Namespace tags. - attr_accessor :tags + # @return [String] Provisioning state of the Namespace. + attr_accessor :provisioning_state - # @return [NamespaceProperties] Gets or sets properties of the Namespace. - attr_accessor :properties + # @return [String] Specifies the targeted region in which the namespace + # should be created. It can be any of the following values: Australia + # EastAustralia SoutheastCentral USEast USEast US 2West USNorth Central + # USSouth Central USEast AsiaSoutheast AsiaBrazil SouthJapan EastJapan + # WestNorth EuropeWest Europe + attr_accessor :region + + # @return [String] Status of the namespace. It can be any of these + # values:1 = Created/Active2 = Creating3 = Suspended4 = Deleting + attr_accessor :status + + # @return [DateTime] The time the namespace was created. + attr_accessor :created_at + + # @return [String] Endpoint you can use to perform NotificationHub + # operations. + attr_accessor :service_bus_endpoint + + # @return [String] The Id of the Azure subscription associated with the + # namespace. + attr_accessor :subscription_id + + # @return [String] ScaleUnit where the namespace gets created + attr_accessor :scale_unit + + # @return [Boolean] Whether or not the namespace is currently enabled. + attr_accessor :enabled + + # @return [Boolean] Whether or not the namespace is set as Critical. + attr_accessor :critical + + # @return [NamespaceType] The namespace type. Possible values include: + # 'Messaging', 'NotificationHub' + attr_accessor :namespace_type # @@ -34,6 +66,30 @@ module Azure::ARM::NotificationHubs name: 'Composite', class_name: 'NamespaceCreateOrUpdateParameters', model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, location: { required: true, serialized_name: 'location', @@ -55,12 +111,90 @@ module Azure::ARM::NotificationHubs } } }, - properties: { - required: true, - serialized_name: 'properties', + sku: { + required: false, + serialized_name: 'sku', type: { name: 'Composite', - class_name: 'NamespaceProperties' + class_name: 'Sku' + } + }, + namespace_create_or_update_parameters_name: { + required: false, + serialized_name: 'properties.name', + type: { + name: 'String' + } + }, + provisioning_state: { + required: false, + serialized_name: 'properties.provisioningState', + type: { + name: 'String' + } + }, + region: { + required: false, + serialized_name: 'properties.region', + type: { + name: 'String' + } + }, + status: { + required: false, + serialized_name: 'properties.status', + type: { + name: 'String' + } + }, + created_at: { + required: false, + serialized_name: 'properties.createdAt', + type: { + name: 'DateTime' + } + }, + service_bus_endpoint: { + required: false, + serialized_name: 'properties.serviceBusEndpoint', + type: { + name: 'String' + } + }, + subscription_id: { + required: false, + serialized_name: 'properties.subscriptionId', + type: { + name: 'String' + } + }, + scale_unit: { + required: false, + serialized_name: 'properties.scaleUnit', + type: { + name: 'String' + } + }, + enabled: { + required: false, + serialized_name: 'properties.enabled', + type: { + name: 'Boolean' + } + }, + critical: { + required: false, + serialized_name: 'properties.critical', + type: { + name: 'Boolean' + } + }, + namespace_type: { + required: false, + serialized_name: 'properties.namespaceType', + type: { + name: 'Enum', + module: 'NamespaceType' } } } diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/namespace_list_result.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/namespace_list_result.rb index a30fb2172..c8569a35b 100644 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/namespace_list_result.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/namespace_list_result.rb @@ -12,12 +12,12 @@ module Azure::ARM::NotificationHubs include MsRestAzure - # @return [Array] Gets or sets result of the List - # Namespace operation. + # @return [Array] Result of the List Namespace + # operation. attr_accessor :value - # @return [String] Gets or sets link to the next set of results. Not - # empty if Value contains incomplete list of Namespaces + # @return [String] Link to the next set of results. Not empty if Value + # contains incomplete list of Namespaces attr_accessor :next_link # return [Proc] with next page method call. diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/namespace_patch_parameters.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/namespace_patch_parameters.rb new file mode 100644 index 000000000..1700cc9c5 --- /dev/null +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/namespace_patch_parameters.rb @@ -0,0 +1,62 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::NotificationHubs + module Models + # + # Parameters supplied to the Patch Namespace operation. + # + class NamespacePatchParameters + + include MsRestAzure + + # @return [Hash{String => String}] Resource tags + attr_accessor :tags + + # @return [Sku] The sku of the created namespace + attr_accessor :sku + + + # + # Mapper for NamespacePatchParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'NamespacePatchParameters', + type: { + name: 'Composite', + class_name: 'NamespacePatchParameters', + model_properties: { + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + sku: { + required: false, + serialized_name: 'sku', + type: { + name: 'Composite', + class_name: 'Sku' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/namespace_properties.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/namespace_properties.rb deleted file mode 100644 index 08babf296..000000000 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/namespace_properties.rb +++ /dev/null @@ -1,153 +0,0 @@ -# encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0 -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. - -module Azure::ARM::NotificationHubs - module Models - # - # Namespace properties. - # - class NamespaceProperties - - include MsRestAzure - - # @return [String] The name of the namespace. - attr_accessor :name - - # @return [String] Gets or sets provisioning state of the Namespace. - attr_accessor :provisioning_state - - # @return [String] Specifies the targeted region in which the namespace - # should be created. It can be any of the following values: Australia - # EastAustralia SoutheastCentral USEast USEast US 2West USNorth Central - # USSouth Central USEast AsiaSoutheast AsiaBrazil SouthJapan EastJapan - # WestNorth EuropeWest Europe - attr_accessor :region - - # @return [String] Status of the namespace. It can be any of these - # values:1 = Created/Active2 = Creating3 = Suspended4 = Deleting - attr_accessor :status - - # @return [DateTime] The time the namespace was created. - attr_accessor :created_at - - # @return [String] Endpoint you can use to perform NotificationHub - # operations. - attr_accessor :service_bus_endpoint - - # @return [String] The Id of the Azure subscription associated with the - # namespace. - attr_accessor :subscription_id - - # @return [String] ScaleUnit where the namespace gets created - attr_accessor :scale_unit - - # @return [Boolean] Whether or not the namespace is currently enabled. - attr_accessor :enabled - - # @return [Boolean] Whether or not the namespace is set as Critical. - attr_accessor :critical - - # @return [NamespaceType] Gets or sets the namespace type. Possible - # values include: 'Messaging', 'NotificationHub' - attr_accessor :namespace_type - - - # - # Mapper for NamespaceProperties class as Ruby Hash. - # This will be used for serialization/deserialization. - # - def self.mapper() - { - required: false, - serialized_name: 'NamespaceProperties', - type: { - name: 'Composite', - class_name: 'NamespaceProperties', - model_properties: { - name: { - required: false, - serialized_name: 'name', - type: { - name: 'String' - } - }, - provisioning_state: { - required: false, - serialized_name: 'provisioningState', - type: { - name: 'String' - } - }, - region: { - required: false, - serialized_name: 'region', - type: { - name: 'String' - } - }, - status: { - required: false, - serialized_name: 'status', - type: { - name: 'String' - } - }, - created_at: { - required: false, - serialized_name: 'createdAt', - type: { - name: 'DateTime' - } - }, - service_bus_endpoint: { - required: false, - serialized_name: 'serviceBusEndpoint', - type: { - name: 'String' - } - }, - subscription_id: { - required: false, - serialized_name: 'subscriptionId', - type: { - name: 'String' - } - }, - scale_unit: { - required: false, - serialized_name: 'scaleUnit', - type: { - name: 'String' - } - }, - enabled: { - required: false, - serialized_name: 'enabled', - type: { - name: 'Boolean' - } - }, - critical: { - required: false, - serialized_name: 'critical', - type: { - name: 'Boolean' - } - }, - namespace_type: { - required: false, - serialized_name: 'namespaceType', - type: { - name: 'Enum', - module: 'NamespaceType' - } - } - } - } - } - end - end - end -end diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/namespace_resource.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/namespace_resource.rb index 9dea777cf..140940e44 100644 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/namespace_resource.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/namespace_resource.rb @@ -8,27 +8,50 @@ module Azure::ARM::NotificationHubs # # Description of a Namespace resource. # - class NamespaceResource + class NamespaceResource < MsRestAzure::Resource include MsRestAzure - # @return [String] Gets or sets the id of the created Namespace. - attr_accessor :id + # @return [String] The name of the namespace. + attr_accessor :namespace_resource_name - # @return [String] Gets or sets datacenter location of the Namespace. - attr_accessor :location + # @return [String] Provisioning state of the Namespace. + attr_accessor :provisioning_state - # @return [String] Gets or sets name of the Namespace. - attr_accessor :name + # @return [String] Specifies the targeted region in which the namespace + # should be created. It can be any of the following values: Australia + # EastAustralia SoutheastCentral USEast USEast US 2West USNorth Central + # USSouth Central USEast AsiaSoutheast AsiaBrazil SouthJapan EastJapan + # WestNorth EuropeWest Europe + attr_accessor :region - # @return [String] Gets or sets resource type of the Namespace. - attr_accessor :type + # @return [String] Status of the namespace. It can be any of these + # values:1 = Created/Active2 = Creating3 = Suspended4 = Deleting + attr_accessor :status - # @return [Hash{String => String}] Gets or sets tags of the Namespace. - attr_accessor :tags + # @return [DateTime] The time the namespace was created. + attr_accessor :created_at - # @return [NamespaceProperties] Gets or sets properties of the Namespace. - attr_accessor :properties + # @return [String] Endpoint you can use to perform NotificationHub + # operations. + attr_accessor :service_bus_endpoint + + # @return [String] The Id of the Azure subscription associated with the + # namespace. + attr_accessor :subscription_id + + # @return [String] ScaleUnit where the namespace gets created + attr_accessor :scale_unit + + # @return [Boolean] Whether or not the namespace is currently enabled. + attr_accessor :enabled + + # @return [Boolean] Whether or not the namespace is set as Critical. + attr_accessor :critical + + # @return [NamespaceType] The namespace type. Possible values include: + # 'Messaging', 'NotificationHub' + attr_accessor :namespace_type # @@ -45,20 +68,15 @@ module Azure::ARM::NotificationHubs model_properties: { id: { required: false, + read_only: true, serialized_name: 'id', type: { name: 'String' } }, - location: { - required: false, - serialized_name: 'location', - type: { - name: 'String' - } - }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -66,11 +84,19 @@ module Azure::ARM::NotificationHubs }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' } }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, tags: { required: false, serialized_name: 'tags', @@ -85,12 +111,90 @@ module Azure::ARM::NotificationHubs } } }, - properties: { + sku: { required: false, - serialized_name: 'properties', + serialized_name: 'sku', type: { name: 'Composite', - class_name: 'NamespaceProperties' + class_name: 'Sku' + } + }, + namespace_resource_name: { + required: false, + serialized_name: 'properties.name', + type: { + name: 'String' + } + }, + provisioning_state: { + required: false, + serialized_name: 'properties.provisioningState', + type: { + name: 'String' + } + }, + region: { + required: false, + serialized_name: 'properties.region', + type: { + name: 'String' + } + }, + status: { + required: false, + serialized_name: 'properties.status', + type: { + name: 'String' + } + }, + created_at: { + required: false, + serialized_name: 'properties.createdAt', + type: { + name: 'DateTime' + } + }, + service_bus_endpoint: { + required: false, + serialized_name: 'properties.serviceBusEndpoint', + type: { + name: 'String' + } + }, + subscription_id: { + required: false, + serialized_name: 'properties.subscriptionId', + type: { + name: 'String' + } + }, + scale_unit: { + required: false, + serialized_name: 'properties.scaleUnit', + type: { + name: 'String' + } + }, + enabled: { + required: false, + serialized_name: 'properties.enabled', + type: { + name: 'Boolean' + } + }, + critical: { + required: false, + serialized_name: 'properties.critical', + type: { + name: 'Boolean' + } + }, + namespace_type: { + required: false, + serialized_name: 'properties.namespaceType', + type: { + name: 'Enum', + module: 'NamespaceType' } } } diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/notification_hub_create_or_update_parameters.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/notification_hub_create_or_update_parameters.rb index 9c0197efe..ddcf62e2d 100644 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/notification_hub_create_or_update_parameters.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/notification_hub_create_or_update_parameters.rb @@ -8,19 +8,43 @@ module Azure::ARM::NotificationHubs # # Parameters supplied to the CreateOrUpdate NotificationHub operation. # - class NotificationHubCreateOrUpdateParameters + class NotificationHubCreateOrUpdateParameters < MsRestAzure::Resource include MsRestAzure - # @return [String] Gets or sets NotificationHub data center location. - attr_accessor :location + # @return [String] The NotificationHub name. + attr_accessor :notification_hub_create_or_update_parameters_name - # @return [Hash{String => String}] Gets or sets NotificationHub tags. - attr_accessor :tags + # @return [String] The RegistrationTtl of the created NotificationHub + attr_accessor :registration_ttl - # @return [NotificationHubProperties] Gets or sets properties of the - # NotificationHub. - attr_accessor :properties + # @return [Array] The + # AuthorizationRules of the created NotificationHub + attr_accessor :authorization_rules + + # @return [ApnsCredential] The ApnsCredential of the created + # NotificationHub + attr_accessor :apns_credential + + # @return [WnsCredential] The WnsCredential of the created + # NotificationHub + attr_accessor :wns_credential + + # @return [GcmCredential] The GcmCredential of the created + # NotificationHub + attr_accessor :gcm_credential + + # @return [MpnsCredential] The MpnsCredential of the created + # NotificationHub + attr_accessor :mpns_credential + + # @return [AdmCredential] The AdmCredential of the created + # NotificationHub + attr_accessor :adm_credential + + # @return [BaiduCredential] The BaiduCredential of the created + # NotificationHub + attr_accessor :baidu_credential # @@ -35,6 +59,30 @@ module Azure::ARM::NotificationHubs name: 'Composite', class_name: 'NotificationHubCreateOrUpdateParameters', model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, location: { required: true, serialized_name: 'location', @@ -56,12 +104,89 @@ module Azure::ARM::NotificationHubs } } }, - properties: { - required: true, - serialized_name: 'properties', + sku: { + required: false, + serialized_name: 'sku', type: { name: 'Composite', - class_name: 'NotificationHubProperties' + class_name: 'Sku' + } + }, + notification_hub_create_or_update_parameters_name: { + required: false, + serialized_name: 'properties.name', + type: { + name: 'String' + } + }, + registration_ttl: { + required: false, + serialized_name: 'properties.registrationTtl', + type: { + name: 'String' + } + }, + authorization_rules: { + required: false, + serialized_name: 'properties.authorizationRules', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'SharedAccessAuthorizationRulePropertiesElementType', + type: { + name: 'Composite', + class_name: 'SharedAccessAuthorizationRuleProperties' + } + } + } + }, + apns_credential: { + required: false, + serialized_name: 'properties.apnsCredential', + type: { + name: 'Composite', + class_name: 'ApnsCredential' + } + }, + wns_credential: { + required: false, + serialized_name: 'properties.wnsCredential', + type: { + name: 'Composite', + class_name: 'WnsCredential' + } + }, + gcm_credential: { + required: false, + serialized_name: 'properties.gcmCredential', + type: { + name: 'Composite', + class_name: 'GcmCredential' + } + }, + mpns_credential: { + required: false, + serialized_name: 'properties.mpnsCredential', + type: { + name: 'Composite', + class_name: 'MpnsCredential' + } + }, + adm_credential: { + required: false, + serialized_name: 'properties.admCredential', + type: { + name: 'Composite', + class_name: 'AdmCredential' + } + }, + baidu_credential: { + required: false, + serialized_name: 'properties.baiduCredential', + type: { + name: 'Composite', + class_name: 'BaiduCredential' } } } diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/notification_hub_list_result.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/notification_hub_list_result.rb index 3916f4146..28b8fb0b2 100644 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/notification_hub_list_result.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/notification_hub_list_result.rb @@ -12,12 +12,12 @@ module Azure::ARM::NotificationHubs include MsRestAzure - # @return [Array] Gets or sets result of the - # List NotificationHub operation. + # @return [Array] Result of the List + # NotificationHub operation. attr_accessor :value - # @return [String] Gets or sets link to the next set of results. Not - # empty if Value contains incomplete list of NotificationHub + # @return [String] Link to the next set of results. Not empty if Value + # contains incomplete list of NotificationHub attr_accessor :next_link # return [Proc] with next page method call. diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/notification_hub_resource.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/notification_hub_resource.rb index fc7dfbe64..9506f3647 100644 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/notification_hub_resource.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/notification_hub_resource.rb @@ -8,30 +8,43 @@ module Azure::ARM::NotificationHubs # # Description of a NotificationHub Resource. # - class NotificationHubResource + class NotificationHubResource < MsRestAzure::Resource include MsRestAzure - # @return [String] Gets or sets the id of the created NotificationHub. - attr_accessor :id + # @return [String] The NotificationHub name. + attr_accessor :notification_hub_resource_name - # @return [String] Gets or sets datacenter location of the - # NotificationHub. - attr_accessor :location + # @return [String] The RegistrationTtl of the created NotificationHub + attr_accessor :registration_ttl - # @return [String] Gets or sets name of the NotificationHub. - attr_accessor :name + # @return [Array] The + # AuthorizationRules of the created NotificationHub + attr_accessor :authorization_rules - # @return [String] Gets or sets resource type of the NotificationHub. - attr_accessor :type + # @return [ApnsCredential] The ApnsCredential of the created + # NotificationHub + attr_accessor :apns_credential - # @return [Hash{String => String}] Gets or sets tags of the - # NotificationHub. - attr_accessor :tags + # @return [WnsCredential] The WnsCredential of the created + # NotificationHub + attr_accessor :wns_credential - # @return [NotificationHubProperties] Gets or sets properties of the - # NotificationHub. - attr_accessor :properties + # @return [GcmCredential] The GcmCredential of the created + # NotificationHub + attr_accessor :gcm_credential + + # @return [MpnsCredential] The MpnsCredential of the created + # NotificationHub + attr_accessor :mpns_credential + + # @return [AdmCredential] The AdmCredential of the created + # NotificationHub + attr_accessor :adm_credential + + # @return [BaiduCredential] The BaiduCredential of the created + # NotificationHub + attr_accessor :baidu_credential # @@ -48,20 +61,15 @@ module Azure::ARM::NotificationHubs model_properties: { id: { required: false, + read_only: true, serialized_name: 'id', type: { name: 'String' } }, - location: { - required: false, - serialized_name: 'location', - type: { - name: 'String' - } - }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -69,11 +77,19 @@ module Azure::ARM::NotificationHubs }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' } }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, tags: { required: false, serialized_name: 'tags', @@ -88,12 +104,89 @@ module Azure::ARM::NotificationHubs } } }, - properties: { + sku: { required: false, - serialized_name: 'properties', + serialized_name: 'sku', type: { name: 'Composite', - class_name: 'NotificationHubProperties' + class_name: 'Sku' + } + }, + notification_hub_resource_name: { + required: false, + serialized_name: 'properties.name', + type: { + name: 'String' + } + }, + registration_ttl: { + required: false, + serialized_name: 'properties.registrationTtl', + type: { + name: 'String' + } + }, + authorization_rules: { + required: false, + serialized_name: 'properties.authorizationRules', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'SharedAccessAuthorizationRulePropertiesElementType', + type: { + name: 'Composite', + class_name: 'SharedAccessAuthorizationRuleProperties' + } + } + } + }, + apns_credential: { + required: false, + serialized_name: 'properties.apnsCredential', + type: { + name: 'Composite', + class_name: 'ApnsCredential' + } + }, + wns_credential: { + required: false, + serialized_name: 'properties.wnsCredential', + type: { + name: 'Composite', + class_name: 'WnsCredential' + } + }, + gcm_credential: { + required: false, + serialized_name: 'properties.gcmCredential', + type: { + name: 'Composite', + class_name: 'GcmCredential' + } + }, + mpns_credential: { + required: false, + serialized_name: 'properties.mpnsCredential', + type: { + name: 'Composite', + class_name: 'MpnsCredential' + } + }, + adm_credential: { + required: false, + serialized_name: 'properties.admCredential', + type: { + name: 'Composite', + class_name: 'AdmCredential' + } + }, + baidu_credential: { + required: false, + serialized_name: 'properties.baiduCredential', + type: { + name: 'Composite', + class_name: 'BaiduCredential' } } } diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/notification_hub_properties.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/pns_credentials_resource.rb similarity index 65% rename from management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/notification_hub_properties.rb rename to management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/pns_credentials_resource.rb index 84d5bf4e2..9b546978e 100644 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/notification_hub_properties.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/pns_credentials_resource.rb @@ -6,22 +6,12 @@ module Azure::ARM::NotificationHubs module Models # - # NotificationHub properties. + # Description of a NotificationHub PNS Credentials. # - class NotificationHubProperties + class PnsCredentialsResource < MsRestAzure::Resource include MsRestAzure - # @return [String] The NotificationHub name. - attr_accessor :name - - # @return [String] The RegistrationTtl of the created NotificationHub - attr_accessor :registration_ttl - - # @return [Array] The - # AuthorizationRules of the created NotificationHub - attr_accessor :authorization_rules - # @return [ApnsCredential] The ApnsCredential of the created # NotificationHub attr_accessor :apns_credential @@ -48,49 +38,73 @@ module Azure::ARM::NotificationHubs # - # Mapper for NotificationHubProperties class as Ruby Hash. + # Mapper for PnsCredentialsResource class as Ruby Hash. # This will be used for serialization/deserialization. # def self.mapper() { required: false, - serialized_name: 'NotificationHubProperties', + serialized_name: 'PnsCredentialsResource', type: { name: 'Composite', - class_name: 'NotificationHubProperties', + class_name: 'PnsCredentialsResource', model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' } }, - registration_ttl: { + type: { required: false, - serialized_name: 'registrationTtl', + read_only: true, + serialized_name: 'type', type: { name: 'String' } }, - authorization_rules: { - required: false, - serialized_name: 'authorizationRules', + location: { + required: true, + serialized_name: 'location', type: { - name: 'Sequence', - element: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { required: false, - serialized_name: 'SharedAccessAuthorizationRulePropertiesElementType', + serialized_name: 'StringElementType', type: { - name: 'Composite', - class_name: 'SharedAccessAuthorizationRuleProperties' + name: 'String' } } } }, + sku: { + required: false, + serialized_name: 'sku', + type: { + name: 'Composite', + class_name: 'Sku' + } + }, apns_credential: { required: false, - serialized_name: 'apnsCredential', + serialized_name: 'properties.apnsCredential', type: { name: 'Composite', class_name: 'ApnsCredential' @@ -98,7 +112,7 @@ module Azure::ARM::NotificationHubs }, wns_credential: { required: false, - serialized_name: 'wnsCredential', + serialized_name: 'properties.wnsCredential', type: { name: 'Composite', class_name: 'WnsCredential' @@ -106,7 +120,7 @@ module Azure::ARM::NotificationHubs }, gcm_credential: { required: false, - serialized_name: 'gcmCredential', + serialized_name: 'properties.gcmCredential', type: { name: 'Composite', class_name: 'GcmCredential' @@ -114,7 +128,7 @@ module Azure::ARM::NotificationHubs }, mpns_credential: { required: false, - serialized_name: 'mpnsCredential', + serialized_name: 'properties.mpnsCredential', type: { name: 'Composite', class_name: 'MpnsCredential' @@ -122,7 +136,7 @@ module Azure::ARM::NotificationHubs }, adm_credential: { required: false, - serialized_name: 'admCredential', + serialized_name: 'properties.admCredential', type: { name: 'Composite', class_name: 'AdmCredential' @@ -130,7 +144,7 @@ module Azure::ARM::NotificationHubs }, baidu_credential: { required: false, - serialized_name: 'baiduCredential', + serialized_name: 'properties.baiduCredential', type: { name: 'Composite', class_name: 'BaiduCredential' diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/policykey_resource.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/policykey_resource.rb new file mode 100644 index 000000000..59688fd95 --- /dev/null +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/policykey_resource.rb @@ -0,0 +1,46 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::NotificationHubs + module Models + # + # Namespace/NotificationHub Regenerate Keys + # + class PolicykeyResource + + include MsRestAzure + + # @return [String] Name of the key that has to be regenerated for the + # Namespace/Notification Hub Authorization Rule. The value can be + # Primary Key/Secondary Key. + attr_accessor :policy_key + + + # + # Mapper for PolicykeyResource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'PolicykeyResource', + type: { + name: 'Composite', + class_name: 'PolicykeyResource', + model_properties: { + policy_key: { + required: false, + serialized_name: 'policyKey', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/resource_list_keys.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/resource_list_keys.rb index 212bac5de..7744f7ba9 100644 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/resource_list_keys.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/resource_list_keys.rb @@ -12,14 +12,22 @@ module Azure::ARM::NotificationHubs include MsRestAzure - # @return [String] Gets or sets the primaryConnectionString of the - # created Namespace AuthorizationRule. + # @return [String] PrimaryConnectionString of the AuthorizationRule. attr_accessor :primary_connection_string - # @return [String] Gets or sets the secondaryConnectionString of the - # created Namespace AuthorizationRule + # @return [String] SecondaryConnectionString of the created + # AuthorizationRule attr_accessor :secondary_connection_string + # @return [String] PrimaryKey of the created AuthorizationRule. + attr_accessor :primary_key + + # @return [String] SecondaryKey of the created AuthorizationRule + attr_accessor :secondary_key + + # @return [String] KeyName of the created AuthorizationRule + attr_accessor :key_name + # # Mapper for ResourceListKeys class as Ruby Hash. @@ -46,6 +54,27 @@ module Azure::ARM::NotificationHubs type: { name: 'String' } + }, + primary_key: { + required: false, + serialized_name: 'primaryKey', + type: { + name: 'String' + } + }, + secondary_key: { + required: false, + serialized_name: 'secondaryKey', + type: { + name: 'String' + } + }, + key_name: { + required: false, + serialized_name: 'keyName', + type: { + name: 'String' + } } } } diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_create_or_update_parameters.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_create_or_update_parameters.rb index b81402d52..e7e293420 100644 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_create_or_update_parameters.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_create_or_update_parameters.rb @@ -8,18 +8,12 @@ module Azure::ARM::NotificationHubs # # Parameters supplied to the CreateOrUpdate Namespace AuthorizationRules. # - class SharedAccessAuthorizationRuleCreateOrUpdateParameters + class SharedAccessAuthorizationRuleCreateOrUpdateParameters < MsRestAzure::Resource include MsRestAzure - # @return [String] Gets or sets Namespace data center location. - attr_accessor :location - - # @return [String] Gets or sets Name of the Namespace AuthorizationRule. - attr_accessor :name - - # @return [SharedAccessAuthorizationRuleProperties] Gets or sets - # properties of the Namespace AuthorizationRules. + # @return [SharedAccessAuthorizationRuleProperties] Properties of the + # Namespace AuthorizationRules. attr_accessor :properties @@ -36,20 +30,59 @@ module Azure::ARM::NotificationHubs name: 'Composite', class_name: 'SharedAccessAuthorizationRuleCreateOrUpdateParameters', model_properties: { - location: { + id: { required: false, - serialized_name: 'location', + read_only: true, + serialized_name: 'id', type: { name: 'String' } }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' } }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + sku: { + required: false, + serialized_name: 'sku', + type: { + name: 'Composite', + class_name: 'Sku' + } + }, properties: { required: true, serialized_name: 'properties', diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_list_result.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_list_result.rb index a46db0a3f..02ee778f9 100644 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_list_result.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_list_result.rb @@ -12,12 +12,12 @@ module Azure::ARM::NotificationHubs include MsRestAzure - # @return [Array] Gets or sets - # result of the List AuthorizationRules operation. + # @return [Array] Result of the + # List AuthorizationRules operation. attr_accessor :value - # @return [String] Gets or sets link to the next set of results. Not - # empty if Value contains incomplete list of AuthorizationRules + # @return [String] Link to the next set of results. Not empty if Value + # contains incomplete list of AuthorizationRules attr_accessor :next_link # return [Proc] with next page method call. diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_properties.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_properties.rb index c3fe8c5d4..aa7caa15f 100644 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_properties.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_properties.rb @@ -12,34 +12,9 @@ module Azure::ARM::NotificationHubs include MsRestAzure - # @return [String] The primary key that was used. - attr_accessor :primary_key - - # @return [String] The secondary key that was used. - attr_accessor :secondary_key - - # @return [String] The name of the key that was used. - attr_accessor :key_name - - # @return [String] The type of the claim. - attr_accessor :claim_type - - # @return [String] The value of the claim. - attr_accessor :claim_value - # @return [Array] The rights associated with the rule. attr_accessor :rights - # @return [DateTime] The time at which the authorization rule was - # created. - attr_accessor :created_time - - # @return [DateTime] The most recent time the rule was updated. - attr_accessor :modified_time - - # @return [Integer] The revision number for the rule. - attr_accessor :revision - # # Mapper for SharedAccessAuthorizationRuleProperties class as Ruby Hash. @@ -53,41 +28,6 @@ module Azure::ARM::NotificationHubs name: 'Composite', class_name: 'SharedAccessAuthorizationRuleProperties', model_properties: { - primary_key: { - required: false, - serialized_name: 'primaryKey', - type: { - name: 'String' - } - }, - secondary_key: { - required: false, - serialized_name: 'secondaryKey', - type: { - name: 'String' - } - }, - key_name: { - required: false, - serialized_name: 'keyName', - type: { - name: 'String' - } - }, - claim_type: { - required: false, - serialized_name: 'claimType', - type: { - name: 'String' - } - }, - claim_value: { - required: false, - serialized_name: 'claimValue', - type: { - name: 'String' - } - }, rights: { required: false, serialized_name: 'rights', @@ -102,27 +42,6 @@ module Azure::ARM::NotificationHubs } } } - }, - created_time: { - required: false, - serialized_name: 'createdTime', - type: { - name: 'DateTime' - } - }, - modified_time: { - required: false, - serialized_name: 'modifiedTime', - type: { - name: 'DateTime' - } - }, - revision: { - required: false, - serialized_name: 'revision', - type: { - name: 'Number' - } } } } diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_resource.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_resource.rb index c697f4555..85e84f09c 100644 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_resource.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_resource.rb @@ -8,32 +8,12 @@ module Azure::ARM::NotificationHubs # # Description of a Namespace AuthorizationRules. # - class SharedAccessAuthorizationRuleResource + class SharedAccessAuthorizationRuleResource < MsRestAzure::Resource include MsRestAzure - # @return [String] Gets or sets the id of the created Namespace - # AuthorizationRules. - attr_accessor :id - - # @return [String] Gets or sets datacenter location of the Namespace - # AuthorizationRules. - attr_accessor :location - - # @return [String] Gets or sets name of the Namespace AuthorizationRules. - attr_accessor :name - - # @return [String] Gets or sets resource type of the Namespace - # AuthorizationRules. - attr_accessor :type - - # @return [Hash{String => String}] Gets or sets tags of the Namespace - # AuthorizationRules. - attr_accessor :tags - - # @return [SharedAccessAuthorizationRuleProperties] Gets or sets - # properties of the Namespace. - attr_accessor :properties + # @return [Array] The rights associated with the rule. + attr_accessor :rights # @@ -50,20 +30,15 @@ module Azure::ARM::NotificationHubs model_properties: { id: { required: false, + read_only: true, serialized_name: 'id', type: { name: 'String' } }, - location: { - required: false, - serialized_name: 'location', - type: { - name: 'String' - } - }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -71,11 +46,19 @@ module Azure::ARM::NotificationHubs }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' } }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, tags: { required: false, serialized_name: 'tags', @@ -90,12 +73,27 @@ module Azure::ARM::NotificationHubs } } }, - properties: { + sku: { required: false, - serialized_name: 'properties', + serialized_name: 'sku', type: { name: 'Composite', - class_name: 'SharedAccessAuthorizationRuleProperties' + class_name: 'Sku' + } + }, + rights: { + required: false, + serialized_name: 'properties.rights', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'AccessRightsElementType', + type: { + name: 'Enum', + module: 'AccessRights' + } + } } } } diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/sku.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/sku.rb new file mode 100644 index 000000000..855ee8182 --- /dev/null +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/sku.rb @@ -0,0 +1,85 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::NotificationHubs + module Models + # + # The Sku description for a namespace + # + class Sku + + include MsRestAzure + + # @return [SkuName] Name of the notification hub sku. Possible values + # include: 'Free', 'Basic', 'Standard' + attr_accessor :name + + # @return [String] The tier of particular sku + attr_accessor :tier + + # @return [String] The Sku size + attr_accessor :size + + # @return [String] The Sku Family + attr_accessor :family + + # @return [Integer] The capacity of the resource + attr_accessor :capacity + + + # + # Mapper for Sku class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Sku', + type: { + name: 'Composite', + class_name: 'Sku', + model_properties: { + name: { + required: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + tier: { + required: false, + serialized_name: 'tier', + type: { + name: 'String' + } + }, + size: { + required: false, + serialized_name: 'size', + type: { + name: 'String' + } + }, + family: { + required: false, + serialized_name: 'family', + type: { + name: 'String' + } + }, + capacity: { + required: false, + serialized_name: 'capacity', + type: { + name: 'Number' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/sku_name.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/sku_name.rb new file mode 100644 index 000000000..72a00e413 --- /dev/null +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/sku_name.rb @@ -0,0 +1,17 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::NotificationHubs + module Models + # + # Defines values for SkuName + # + module SkuName + Free = "Free" + Basic = "Basic" + Standard = "Standard" + end + end +end diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/wns_credential.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/wns_credential.rb index 8283428f3..8043415bd 100644 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/wns_credential.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/wns_credential.rb @@ -12,9 +12,14 @@ module Azure::ARM::NotificationHubs include MsRestAzure - # @return [WnsCredentialProperties] Gets or sets properties of - # NotificationHub WnsCredential. - attr_accessor :properties + # @return [String] The package ID for this credential. + attr_accessor :package_sid + + # @return [String] The secret key. + attr_accessor :secret_key + + # @return [String] The Windows Live endpoint. + attr_accessor :windows_live_endpoint # @@ -29,12 +34,25 @@ module Azure::ARM::NotificationHubs name: 'Composite', class_name: 'WnsCredential', model_properties: { - properties: { + package_sid: { required: false, - serialized_name: 'properties', + serialized_name: 'properties.packageSid', type: { - name: 'Composite', - class_name: 'WnsCredentialProperties' + name: 'String' + } + }, + secret_key: { + required: false, + serialized_name: 'properties.secretKey', + type: { + name: 'String' + } + }, + windows_live_endpoint: { + required: false, + serialized_name: 'properties.windowsLiveEndpoint', + type: { + name: 'String' } } } diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/wns_credential_properties.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/wns_credential_properties.rb deleted file mode 100644 index 0aa2e3f9c..000000000 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/wns_credential_properties.rb +++ /dev/null @@ -1,64 +0,0 @@ -# encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0 -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. - -module Azure::ARM::NotificationHubs - module Models - # - # Description of a NotificationHub WnsCredential. - # - class WnsCredentialProperties - - include MsRestAzure - - # @return [String] Gets or sets the package ID for this credential. - attr_accessor :package_sid - - # @return [String] Gets or sets the secret key. - attr_accessor :secret_key - - # @return [String] Gets or sets the Windows Live endpoint. - attr_accessor :windows_live_endpoint - - - # - # Mapper for WnsCredentialProperties class as Ruby Hash. - # This will be used for serialization/deserialization. - # - def self.mapper() - { - required: false, - serialized_name: 'WnsCredentialProperties', - type: { - name: 'Composite', - class_name: 'WnsCredentialProperties', - model_properties: { - package_sid: { - required: false, - serialized_name: 'packageSid', - type: { - name: 'String' - } - }, - secret_key: { - required: false, - serialized_name: 'secretKey', - type: { - name: 'String' - } - }, - windows_live_endpoint: { - required: false, - serialized_name: 'windowsLiveEndpoint', - type: { - name: 'String' - } - } - } - } - } - end - end - end -end diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/namespaces.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/namespaces.rb index c950ae9ac..614ef23e6 100644 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/namespaces.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/namespaces.rb @@ -23,15 +23,15 @@ module Azure::ARM::NotificationHubs attr_reader :client # - # Checks the availability of the given service namespace across all Windows - # Azure subscriptions. This is useful because the domain name is created - # based on the service namespace name. + # Checks the availability of the given service namespace across all Azure + # subscriptions. This is useful because the domain name is created based on + # the service namespace name. # # @param parameters [CheckAvailabilityParameters] The namespace name. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [CheckAvailabilityResource] operation results. + # @return [CheckAvailabilityResult] operation results. # def check_availability(parameters, custom_headers = nil) response = check_availability_async(parameters, custom_headers).value! @@ -39,9 +39,9 @@ module Azure::ARM::NotificationHubs end # - # Checks the availability of the given service namespace across all Windows - # Azure subscriptions. This is useful because the domain name is created - # based on the service namespace name. + # Checks the availability of the given service namespace across all Azure + # subscriptions. This is useful because the domain name is created based on + # the service namespace name. # # @param parameters [CheckAvailabilityParameters] The namespace name. # @param custom_headers [Hash{String => String}] A hash of custom headers that @@ -54,9 +54,9 @@ module Azure::ARM::NotificationHubs end # - # Checks the availability of the given service namespace across all Windows - # Azure subscriptions. This is useful because the domain name is created - # based on the service namespace name. + # Checks the availability of the given service namespace across all Azure + # subscriptions. This is useful because the domain name is created based on + # the service namespace name. # # @param parameters [CheckAvailabilityParameters] The namespace name. # @param [Hash{String => String}] A hash of custom headers that will be added @@ -111,7 +111,7 @@ module Azure::ARM::NotificationHubs if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = CheckAvailabilityResource.mapper() + result_mapper = CheckAvailabilityResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response, 'result.body') rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -244,6 +244,113 @@ module Azure::ARM::NotificationHubs promise.execute end + # + # Patches the existing namespace + # + # @param resource_group_name [String] The name of the resource group. + # @param namespace_name [String] The namespace name. + # @param parameters [NamespacePatchParameters] Parameters supplied to patch a + # Namespace Resource. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [NamespaceResource] operation results. + # + def patch(resource_group_name, namespace_name, parameters, custom_headers = nil) + response = patch_async(resource_group_name, namespace_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Patches the existing namespace + # + # @param resource_group_name [String] The name of the resource group. + # @param namespace_name [String] The namespace name. + # @param parameters [NamespacePatchParameters] Parameters supplied to patch a + # Namespace Resource. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def patch_with_http_info(resource_group_name, namespace_name, parameters, custom_headers = nil) + patch_async(resource_group_name, namespace_name, parameters, custom_headers).value! + end + + # + # Patches the existing namespace + # + # @param resource_group_name [String] The name of the resource group. + # @param namespace_name [String] The namespace name. + # @param parameters [NamespacePatchParameters] Parameters supplied to patch a + # Namespace Resource. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def patch_async(resource_group_name, namespace_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = NamespacePatchParameters.mapper() + request_content = @client.serialize(request_mapper, parameters, 'parameters') + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:patch, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = NamespaceResource.mapper() + result.body = @client.deserialize(result_mapper, parsed_response, 'result.body') + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + # # Deletes an existing namespace. This operation also removes all associated # notificationHubs under the namespace. @@ -718,7 +825,7 @@ module Azure::ARM::NotificationHubs headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -747,91 +854,6 @@ module Azure::ARM::NotificationHubs promise.execute end - # - # The Get Operation Status operation returns the status of the specified - # operation. After calling an asynchronous operation, you can call Get - # Operation Status to determine whether the operation has succeeded, failed, - # or is still in progress. - # - # @param operation_status_link [String] Location value returned by the Begin - # operation. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # - def get_long_running_operation_status(operation_status_link, custom_headers = nil) - response = get_long_running_operation_status_async(operation_status_link, custom_headers).value! - nil - end - - # - # The Get Operation Status operation returns the status of the specified - # operation. After calling an asynchronous operation, you can call Get - # Operation Status to determine whether the operation has succeeded, failed, - # or is still in progress. - # - # @param operation_status_link [String] Location value returned by the Begin - # operation. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. - # - def get_long_running_operation_status_with_http_info(operation_status_link, custom_headers = nil) - get_long_running_operation_status_async(operation_status_link, custom_headers).value! - end - - # - # The Get Operation Status operation returns the status of the specified - # operation. After calling an asynchronous operation, you can call Get - # Operation Status to determine whether the operation has succeeded, failed, - # or is still in progress. - # - # @param operation_status_link [String] Location value returned by the Begin - # operation. - # @param [Hash{String => String}] A hash of custom headers that will be added - # to the HTTP request. - # - # @return [Concurrent::Promise] Promise object which holds the HTTP response. - # - def get_long_running_operation_status_async(operation_status_link, custom_headers = nil) - fail ArgumentError, 'operation_status_link is nil' if operation_status_link.nil? - - - request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = '/{operationStatusLink}' - - request_url = @base_url || @client.base_url - - options = { - middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - skip_encoding_path_params: {'operationStatusLink' => operation_status_link}, - headers: request_headers.merge(custom_headers || {}), - base_url: request_url - } - promise = @client.make_request_async(:get, path_template, options) - - promise = promise.then do |result| - http_response = result.response - status_code = http_response.status - response_content = http_response.body - unless status_code == 404 || status_code == 202 || status_code == 200 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) - end - - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - - result - end - - promise.execute - end - # # Lists the available namespaces within a resourceGroup. # @@ -1139,7 +1161,7 @@ module Azure::ARM::NotificationHubs headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -1266,6 +1288,120 @@ module Azure::ARM::NotificationHubs promise.execute end + # + # Regenerates the Primary/Secondary Keys to the Namespace Authorization Rule + # + # @param resource_group_name [String] The name of the resource group. + # @param namespace_name [String] The namespace name. + # @param authorization_rule_name [String] The connection string of the + # namespace for the specified authorizationRule. + # @param parameters [PolicykeyResource] Parameters supplied to regenerate the + # Namespace Authorization Rule Key. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ResourceListKeys] operation results. + # + def regenerate_keys(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers = nil) + response = regenerate_keys_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Regenerates the Primary/Secondary Keys to the Namespace Authorization Rule + # + # @param resource_group_name [String] The name of the resource group. + # @param namespace_name [String] The namespace name. + # @param authorization_rule_name [String] The connection string of the + # namespace for the specified authorizationRule. + # @param parameters [PolicykeyResource] Parameters supplied to regenerate the + # Namespace Authorization Rule Key. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def regenerate_keys_with_http_info(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers = nil) + regenerate_keys_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers).value! + end + + # + # Regenerates the Primary/Secondary Keys to the Namespace Authorization Rule + # + # @param resource_group_name [String] The name of the resource group. + # @param namespace_name [String] The namespace name. + # @param authorization_rule_name [String] The connection string of the + # namespace for the specified authorizationRule. + # @param parameters [PolicykeyResource] Parameters supplied to regenerate the + # Namespace Authorization Rule Key. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def regenerate_keys_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = PolicykeyResource.mapper() + request_content = @client.serialize(request_mapper, parameters, 'parameters') + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/regenerateKeys' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'authorizationRuleName' => authorization_rule_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = ResourceListKeys.mapper() + result.body = @client.deserialize(result_mapper, parsed_response, 'result.body') + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + # # Lists the available namespaces within a resourceGroup. # @@ -1501,7 +1637,7 @@ module Azure::ARM::NotificationHubs headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/notification_hubs.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/notification_hubs.rb index 7fb718814..041048547 100644 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/notification_hubs.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/notification_hubs.rb @@ -31,7 +31,7 @@ module Azure::ARM::NotificationHubs # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [CheckAvailabilityResource] operation results. + # @return [CheckAvailabilityResult] operation results. # def check_availability(resource_group_name, namespace_name, parameters, custom_headers = nil) response = check_availability_async(resource_group_name, namespace_name, parameters, custom_headers).value! @@ -113,7 +113,7 @@ module Azure::ARM::NotificationHubs if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = CheckAvailabilityResource.mapper() + result_mapper = CheckAvailabilityResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response, 'result.body') rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -699,7 +699,7 @@ module Azure::ARM::NotificationHubs headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -930,7 +930,7 @@ module Azure::ARM::NotificationHubs headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -1061,6 +1061,127 @@ module Azure::ARM::NotificationHubs promise.execute end + # + # Regenerates the Primary/Secondary Keys to the NotificationHub Authorization + # Rule + # + # @param resource_group_name [String] The name of the resource group. + # @param namespace_name [String] The namespace name. + # @param notification_hub_name [String] The notification hub name. + # @param authorization_rule_name [String] The connection string of the + # NotificationHub for the specified authorizationRule. + # @param parameters [PolicykeyResource] Parameters supplied to regenerate the + # NotificationHub Authorization Rule Key. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ResourceListKeys] operation results. + # + def regenerate_keys(resource_group_name, namespace_name, notification_hub_name, authorization_rule_name, parameters, custom_headers = nil) + response = regenerate_keys_async(resource_group_name, namespace_name, notification_hub_name, authorization_rule_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Regenerates the Primary/Secondary Keys to the NotificationHub Authorization + # Rule + # + # @param resource_group_name [String] The name of the resource group. + # @param namespace_name [String] The namespace name. + # @param notification_hub_name [String] The notification hub name. + # @param authorization_rule_name [String] The connection string of the + # NotificationHub for the specified authorizationRule. + # @param parameters [PolicykeyResource] Parameters supplied to regenerate the + # NotificationHub Authorization Rule Key. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def regenerate_keys_with_http_info(resource_group_name, namespace_name, notification_hub_name, authorization_rule_name, parameters, custom_headers = nil) + regenerate_keys_async(resource_group_name, namespace_name, notification_hub_name, authorization_rule_name, parameters, custom_headers).value! + end + + # + # Regenerates the Primary/Secondary Keys to the NotificationHub Authorization + # Rule + # + # @param resource_group_name [String] The name of the resource group. + # @param namespace_name [String] The namespace name. + # @param notification_hub_name [String] The notification hub name. + # @param authorization_rule_name [String] The connection string of the + # NotificationHub for the specified authorizationRule. + # @param parameters [PolicykeyResource] Parameters supplied to regenerate the + # NotificationHub Authorization Rule Key. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def regenerate_keys_async(resource_group_name, namespace_name, notification_hub_name, authorization_rule_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'notification_hub_name is nil' if notification_hub_name.nil? + fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = PolicykeyResource.mapper() + request_content = @client.serialize(request_mapper, parameters, 'parameters') + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/AuthorizationRules/{authorizationRuleName}/regenerateKeys' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'notificationHubName' => notification_hub_name,'authorizationRuleName' => authorization_rule_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = ResourceListKeys.mapper() + result.body = @client.deserialize(result_mapper, parsed_response, 'result.body') + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + # # Lists the PNS Credentials associated with a notification hub . # @@ -1070,7 +1191,7 @@ module Azure::ARM::NotificationHubs # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [NotificationHubResource] operation results. + # @return [PnsCredentialsResource] operation results. # def get_pns_credentials(resource_group_name, namespace_name, notification_hub_name, custom_headers = nil) response = get_pns_credentials_async(resource_group_name, namespace_name, notification_hub_name, custom_headers).value! @@ -1143,7 +1264,7 @@ module Azure::ARM::NotificationHubs if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = NotificationHubResource.mapper() + result_mapper = PnsCredentialsResource.mapper() result.body = @client.deserialize(result_mapper, parsed_response, 'result.body') rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -1301,7 +1422,7 @@ module Azure::ARM::NotificationHubs headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/notification_hubs_management_client.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/notification_hubs_management_client.rb index 0a13545b4..961b61844 100644 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/notification_hubs_management_client.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/notification_hubs_management_client.rb @@ -58,7 +58,7 @@ module Azure::ARM::NotificationHubs @namespaces = Namespaces.new(self) @notification_hubs = NotificationHubs.new(self) - @api_version = '2014-09-01' + @api_version = '2016-03-01' @accept_language = 'en-US' @long_running_operation_retry_timeout = 30 @generate_client_request_id = true diff --git a/swagger_to_sdk_config.json b/swagger_to_sdk_config.json index 8f31de74c..fdb196c59 100644 --- a/swagger_to_sdk_config.json +++ b/swagger_to_sdk_config.json @@ -248,7 +248,7 @@ ] }, "azure_mgmt_notification_hubs": { - "swagger": "arm-notificationhubs/2014-09-01/swagger/notificationhubs.json", + "swagger": "arm-notificationhubs/2016-03-01/swagger/notificationhubs.json", "autorest_options": { "Namespace": "Azure::ARM::NotificationHubs", "PackageName": "azure_mgmt_notification_hubs",