зеркало из
1
0
Форкнуть 0

Generated from dfd0ac4a584e718d2f63d1672434160a6cba517a

This commit is contained in:
SwaggerToSDK Automation 2017-03-27 17:59:36 +00:00
Родитель 4338122789
Коммит 5dabf85957
26 изменённых файлов: 1505 добавлений и 300 удалений

Просмотреть файл

@ -28,31 +28,38 @@ module Azure::ARM::ServiceBus
autoload :ServiceBusManagementClient, 'generated/azure_mgmt_service_bus/service_bus_management_client.rb'
module Models
autoload :RegenerateKeysParameters, 'generated/azure_mgmt_service_bus/models/regenerate_keys_parameters.rb'
autoload :QueueCreateOrUpdateParameters, 'generated/azure_mgmt_service_bus/models/queue_create_or_update_parameters.rb'
autoload :MessageCountDetails, 'generated/azure_mgmt_service_bus/models/message_count_details.rb'
autoload :Sku, 'generated/azure_mgmt_service_bus/models/sku.rb'
autoload :CheckNameAvailabilityResult, 'generated/azure_mgmt_service_bus/models/check_name_availability_result.rb'
autoload :NamespaceUpdateParameters, 'generated/azure_mgmt_service_bus/models/namespace_update_parameters.rb'
autoload :QueueListResult, 'generated/azure_mgmt_service_bus/models/queue_list_result.rb'
autoload :SharedAccessAuthorizationRuleListResult, 'generated/azure_mgmt_service_bus/models/shared_access_authorization_rule_list_result.rb'
autoload :OperationListResult, 'generated/azure_mgmt_service_bus/models/operation_list_result.rb'
autoload :RegenerateKeysParameters, 'generated/azure_mgmt_service_bus/models/regenerate_keys_parameters.rb'
autoload :NamespaceCreateOrUpdateParameters, 'generated/azure_mgmt_service_bus/models/namespace_create_or_update_parameters.rb'
autoload :CheckNameAvailability, 'generated/azure_mgmt_service_bus/models/check_name_availability.rb'
autoload :NamespaceListResult, 'generated/azure_mgmt_service_bus/models/namespace_list_result.rb'
autoload :SharedAccessAuthorizationRuleCreateOrUpdateParameters, 'generated/azure_mgmt_service_bus/models/shared_access_authorization_rule_create_or_update_parameters.rb'
autoload :QueueListResult, 'generated/azure_mgmt_service_bus/models/queue_list_result.rb'
autoload :SharedAccessAuthorizationRuleListResult, 'generated/azure_mgmt_service_bus/models/shared_access_authorization_rule_list_result.rb'
autoload :TopicCreateOrUpdateParameters, 'generated/azure_mgmt_service_bus/models/topic_create_or_update_parameters.rb'
autoload :Sku, 'generated/azure_mgmt_service_bus/models/sku.rb'
autoload :OperationListResult, 'generated/azure_mgmt_service_bus/models/operation_list_result.rb'
autoload :NamespaceUpdateParameters, 'generated/azure_mgmt_service_bus/models/namespace_update_parameters.rb'
autoload :TopicListResult, 'generated/azure_mgmt_service_bus/models/topic_list_result.rb'
autoload :ResourceListKeys, 'generated/azure_mgmt_service_bus/models/resource_list_keys.rb'
autoload :SubscriptionCreateOrUpdateParameters, 'generated/azure_mgmt_service_bus/models/subscription_create_or_update_parameters.rb'
autoload :CheckNameAvailabilityResult, 'generated/azure_mgmt_service_bus/models/check_name_availability_result.rb'
autoload :Operation, 'generated/azure_mgmt_service_bus/models/operation.rb'
autoload :OperationDisplay, 'generated/azure_mgmt_service_bus/models/operation_display.rb'
autoload :SubscriptionListResult, 'generated/azure_mgmt_service_bus/models/subscription_list_result.rb'
autoload :TrackedResource, 'generated/azure_mgmt_service_bus/models/tracked_resource.rb'
autoload :Namespace, 'generated/azure_mgmt_service_bus/models/namespace.rb'
autoload :SharedAccessAuthorizationRule, 'generated/azure_mgmt_service_bus/models/shared_access_authorization_rule.rb'
autoload :Queue, 'generated/azure_mgmt_service_bus/models/queue.rb'
autoload :Topic, 'generated/azure_mgmt_service_bus/models/topic.rb'
autoload :Subscription, 'generated/azure_mgmt_service_bus/models/subscription.rb'
autoload :NamespaceResource, 'generated/azure_mgmt_service_bus/models/namespace_resource.rb'
autoload :SharedAccessAuthorizationRuleResource, 'generated/azure_mgmt_service_bus/models/shared_access_authorization_rule_resource.rb'
autoload :QueueResource, 'generated/azure_mgmt_service_bus/models/queue_resource.rb'
autoload :TopicResource, 'generated/azure_mgmt_service_bus/models/topic_resource.rb'
autoload :SubscriptionResource, 'generated/azure_mgmt_service_bus/models/subscription_resource.rb'
autoload :SkuName, 'generated/azure_mgmt_service_bus/models/sku_name.rb'
autoload :SkuTier, 'generated/azure_mgmt_service_bus/models/sku_tier.rb'
autoload :NamespaceState, 'generated/azure_mgmt_service_bus/models/namespace_state.rb'
autoload :AccessRights, 'generated/azure_mgmt_service_bus/models/access_rights.rb'
autoload :Policykey, 'generated/azure_mgmt_service_bus/models/policykey.rb'
autoload :EntityAvailabilityStatus, 'generated/azure_mgmt_service_bus/models/entity_availability_status.rb'
autoload :EntityStatus, 'generated/azure_mgmt_service_bus/models/entity_status.rb'
autoload :UnavailableReason, 'generated/azure_mgmt_service_bus/models/unavailable_reason.rb'
end

Просмотреть файл

@ -0,0 +1,19 @@
# encoding: utf-8
# Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
module Azure::ARM::ServiceBus
module Models
#
# Defines values for EntityAvailabilityStatus
#
module EntityAvailabilityStatus
Available = "Available"
Limited = "Limited"
Renaming = "Renaming"
Restoring = "Restoring"
Unknown = "Unknown"
end
end
end

Просмотреть файл

@ -0,0 +1,151 @@
# encoding: utf-8
# Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
module Azure::ARM::ServiceBus
module Models
#
# Parameters supplied to the Create Or Update Namespace operation.
#
class NamespaceCreateOrUpdateParameters
include MsRestAzure
# @return [String] Namespace location.
attr_accessor :location
# @return [Sku]
attr_accessor :sku
# @return [Hash{String => String}] Namespace tags.
attr_accessor :tags
# @return [String] Provisioning state of the namespace.
attr_accessor :provisioning_state
# @return [NamespaceState] State of the namespace. Possible values
# include: 'Unknown', 'Creating', 'Created', 'Activating', 'Enabling',
# 'Active', 'Disabling', 'Disabled', 'SoftDeleting', 'SoftDeleted',
# 'Removing', 'Removed', 'Failed'
attr_accessor :status
# @return [DateTime] The time the namespace was created.
attr_accessor :created_at
# @return [DateTime] The time the namespace was updated.
attr_accessor :updated_at
# @return [String] Endpoint you can use to perform Service Bus
# operations.
attr_accessor :service_bus_endpoint
# @return [Boolean] Indicates whether to create an ACS namespace.
attr_accessor :create_acsnamespace
# @return [Boolean] Specifies whether this instance is enabled.
attr_accessor :enabled
#
# Mapper for NamespaceCreateOrUpdateParameters class as Ruby Hash.
# This will be used for serialization/deserialization.
#
def self.mapper()
{
required: false,
serialized_name: 'NamespaceCreateOrUpdateParameters',
type: {
name: 'Composite',
class_name: 'NamespaceCreateOrUpdateParameters',
model_properties: {
location: {
required: true,
serialized_name: 'location',
type: {
name: 'String'
}
},
sku: {
required: false,
serialized_name: 'sku',
type: {
name: 'Composite',
class_name: 'Sku'
}
},
tags: {
required: false,
serialized_name: 'tags',
type: {
name: 'Dictionary',
value: {
required: false,
serialized_name: 'StringElementType',
type: {
name: 'String'
}
}
}
},
provisioning_state: {
required: false,
read_only: true,
serialized_name: 'properties.provisioningState',
type: {
name: 'String'
}
},
status: {
required: false,
serialized_name: 'properties.status',
type: {
name: 'Enum',
module: 'NamespaceState'
}
},
created_at: {
required: false,
read_only: true,
serialized_name: 'properties.createdAt',
type: {
name: 'DateTime'
}
},
updated_at: {
required: false,
read_only: true,
serialized_name: 'properties.updatedAt',
type: {
name: 'DateTime'
}
},
service_bus_endpoint: {
required: false,
read_only: true,
serialized_name: 'properties.serviceBusEndpoint',
type: {
name: 'String'
}
},
create_acsnamespace: {
required: false,
serialized_name: 'properties.createACSNamespace',
type: {
name: 'Boolean'
}
},
enabled: {
required: false,
serialized_name: 'properties.enabled',
type: {
name: 'Boolean'
}
}
}
}
}
end
end
end
end

Просмотреть файл

@ -12,7 +12,8 @@ module Azure::ARM::ServiceBus
include MsRestAzure
# @return [Array<Namespace>] Result of the List Namespace operation.
# @return [Array<NamespaceResource>] Result of the List Namespace
# operation.
attr_accessor :value
# @return [String] Link to the next set of results. Not empty if Value
@ -25,7 +26,7 @@ module Azure::ARM::ServiceBus
#
# Gets the rest of the items for the request, enabling auto-pagination.
#
# @return [Array<Namespace>] operation results.
# @return [Array<NamespaceResource>] operation results.
#
def get_all_items
items = @value
@ -70,10 +71,10 @@ module Azure::ARM::ServiceBus
name: 'Sequence',
element: {
required: false,
serialized_name: 'NamespaceElementType',
serialized_name: 'NamespaceResourceElementType',
type: {
name: 'Composite',
class_name: 'Namespace'
class_name: 'NamespaceResource'
}
}
}

Просмотреть файл

@ -8,7 +8,7 @@ module Azure::ARM::ServiceBus
#
# Description of a namespace resource.
#
class Namespace < TrackedResource
class NamespaceResource < TrackedResource
include MsRestAzure
@ -18,6 +18,12 @@ module Azure::ARM::ServiceBus
# @return [String] Provisioning state of the namespace.
attr_accessor :provisioning_state
# @return [NamespaceState] State of the namespace. Possible values
# include: 'Unknown', 'Creating', 'Created', 'Activating', 'Enabling',
# 'Active', 'Disabling', 'Disabled', 'SoftDeleting', 'SoftDeleted',
# 'Removing', 'Removed', 'Failed'
attr_accessor :status
# @return [DateTime] The time the namespace was created.
attr_accessor :created_at
@ -28,21 +34,24 @@ module Azure::ARM::ServiceBus
# operations.
attr_accessor :service_bus_endpoint
# @return [String] Identifier for Azure Insights metrics
attr_accessor :metric_id
# @return [Boolean] Indicates whether to create an ACS namespace.
attr_accessor :create_acsnamespace
# @return [Boolean] Specifies whether this instance is enabled.
attr_accessor :enabled
#
# Mapper for Namespace class as Ruby Hash.
# Mapper for NamespaceResource class as Ruby Hash.
# This will be used for serialization/deserialization.
#
def self.mapper()
{
required: false,
serialized_name: 'Namespace',
serialized_name: 'NamespaceResource',
type: {
name: 'Composite',
class_name: 'Namespace',
class_name: 'NamespaceResource',
model_properties: {
id: {
required: false,
@ -105,6 +114,14 @@ module Azure::ARM::ServiceBus
name: 'String'
}
},
status: {
required: false,
serialized_name: 'properties.status',
type: {
name: 'Enum',
module: 'NamespaceState'
}
},
created_at: {
required: false,
read_only: true,
@ -129,12 +146,18 @@ module Azure::ARM::ServiceBus
name: 'String'
}
},
metric_id: {
create_acsnamespace: {
required: false,
read_only: true,
serialized_name: 'properties.metricId',
serialized_name: 'properties.createACSNamespace',
type: {
name: 'String'
name: 'Boolean'
}
},
enabled: {
required: false,
serialized_name: 'properties.enabled',
type: {
name: 'Boolean'
}
}
}

Просмотреть файл

@ -0,0 +1,27 @@
# encoding: utf-8
# Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
module Azure::ARM::ServiceBus
module Models
#
# Defines values for NamespaceState
#
module NamespaceState
Unknown = "Unknown"
Creating = "Creating"
Created = "Created"
Activating = "Activating"
Enabling = "Enabling"
Active = "Active"
Disabling = "Disabling"
Disabled = "Disabled"
SoftDeleting = "SoftDeleting"
SoftDeleted = "SoftDeleted"
Removing = "Removing"
Removed = "Removed"
Failed = "Failed"
end
end
end

Просмотреть файл

@ -0,0 +1,307 @@
# encoding: utf-8
# Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
module Azure::ARM::ServiceBus
module Models
#
# Parameters supplied to the Create Or Update Queue operation.
#
class QueueCreateOrUpdateParameters
include MsRestAzure
# @return [String] Queue name.
attr_accessor :name
# @return [String] location of the resource.
attr_accessor :location
# @return [String] The duration of a peek-lock; that is, the amount of
# time that the message is locked for other receivers. The maximum value
# for LockDuration is 5 minutes; the default value is 1 minute.
attr_accessor :lock_duration
# @return [DateTime] Last time a message was sent, or the last time there
# was a receive request to this queue.
attr_accessor :accessed_at
# @return [String] the TimeSpan idle interval after which the queue is
# automatically deleted. The minimum duration is 5 minutes.
attr_accessor :auto_delete_on_idle
# @return [EntityAvailabilityStatus] Entity availability status for the
# queue. Possible values include: 'Available', 'Limited', 'Renaming',
# 'Restoring', 'Unknown'
attr_accessor :entity_availability_status
# @return [DateTime] The exact time the message was created.
attr_accessor :created_at
# @return [String] The default message time to live value. This is the
# duration after which the message expires, starting from when the
# message is sent to Service Bus. This is the default value used when
# TimeToLive is not set on a message itself.
attr_accessor :default_message_time_to_live
# @return [String] TimeSpan structure that defines the duration of the
# duplicate detection history. The default value is 10 minutes.
attr_accessor :duplicate_detection_history_time_window
# @return [Boolean] A value that indicates whether server-side batched
# operations are enabled.
attr_accessor :enable_batched_operations
# @return [Boolean] A value that indicates whether this queue has dead
# letter support when a message expires.
attr_accessor :dead_lettering_on_message_expiration
# @return [Boolean] A value that indicates whether Express Entities are
# enabled. An express queue holds a message in memory temporarily before
# writing it to persistent storage.
attr_accessor :enable_express
# @return [Boolean] A value that indicates whether the queue is to be
# partitioned across multiple message brokers.
attr_accessor :enable_partitioning
# @return [Boolean] A value that indicates whether the message is
# accessible anonymously.
attr_accessor :is_anonymous_accessible
# @return [Integer] The maximum delivery count. A message is
# automatically deadlettered after this number of deliveries.
attr_accessor :max_delivery_count
# @return [Integer] The maximum size of the queue in megabytes, which is
# the size of memory allocated for the queue.
attr_accessor :max_size_in_megabytes
# @return [Integer] The number of messages in the queue.
attr_accessor :message_count
# @return [MessageCountDetails]
attr_accessor :count_details
# @return [Boolean] A value indicating if this queue requires duplicate
# detection.
attr_accessor :requires_duplicate_detection
# @return [Boolean] A value that indicates whether the queue supports the
# concept of sessions.
attr_accessor :requires_session
# @return [Integer] The size of the queue, in bytes.
attr_accessor :size_in_bytes
# @return [EntityStatus] Enumerates the possible values for the status of
# a messaging entity. Possible values include: 'Active', 'Creating',
# 'Deleting', 'Disabled', 'ReceiveDisabled', 'Renaming', 'Restoring',
# 'SendDisabled', 'Unknown'
attr_accessor :status
# @return [Boolean] A value that indicates whether the queue supports
# ordering.
attr_accessor :support_ordering
# @return [DateTime] The exact time the message was updated.
attr_accessor :updated_at
#
# Mapper for QueueCreateOrUpdateParameters class as Ruby Hash.
# This will be used for serialization/deserialization.
#
def self.mapper()
{
required: false,
serialized_name: 'QueueCreateOrUpdateParameters',
type: {
name: 'Composite',
class_name: 'QueueCreateOrUpdateParameters',
model_properties: {
name: {
required: false,
serialized_name: 'name',
type: {
name: 'String'
}
},
location: {
required: true,
serialized_name: 'location',
type: {
name: 'String'
}
},
lock_duration: {
required: false,
serialized_name: 'properties.lockDuration',
type: {
name: 'String'
}
},
accessed_at: {
required: false,
read_only: true,
serialized_name: 'properties.accessedAt',
type: {
name: 'DateTime'
}
},
auto_delete_on_idle: {
required: false,
serialized_name: 'properties.autoDeleteOnIdle',
type: {
name: 'String'
}
},
entity_availability_status: {
required: false,
serialized_name: 'properties.entityAvailabilityStatus',
type: {
name: 'Enum',
module: 'EntityAvailabilityStatus'
}
},
created_at: {
required: false,
read_only: true,
serialized_name: 'properties.createdAt',
type: {
name: 'DateTime'
}
},
default_message_time_to_live: {
required: false,
serialized_name: 'properties.defaultMessageTimeToLive',
type: {
name: 'String'
}
},
duplicate_detection_history_time_window: {
required: false,
serialized_name: 'properties.duplicateDetectionHistoryTimeWindow',
type: {
name: 'String'
}
},
enable_batched_operations: {
required: false,
serialized_name: 'properties.enableBatchedOperations',
type: {
name: 'Boolean'
}
},
dead_lettering_on_message_expiration: {
required: false,
serialized_name: 'properties.deadLetteringOnMessageExpiration',
type: {
name: 'Boolean'
}
},
enable_express: {
required: false,
serialized_name: 'properties.enableExpress',
type: {
name: 'Boolean'
}
},
enable_partitioning: {
required: false,
serialized_name: 'properties.enablePartitioning',
type: {
name: 'Boolean'
}
},
is_anonymous_accessible: {
required: false,
serialized_name: 'properties.isAnonymousAccessible',
type: {
name: 'Boolean'
}
},
max_delivery_count: {
required: false,
serialized_name: 'properties.maxDeliveryCount',
type: {
name: 'Number'
}
},
max_size_in_megabytes: {
required: false,
serialized_name: 'properties.maxSizeInMegabytes',
type: {
name: 'Number'
}
},
message_count: {
required: false,
read_only: true,
serialized_name: 'properties.messageCount',
type: {
name: 'Number'
}
},
count_details: {
required: false,
read_only: true,
serialized_name: 'properties.countDetails',
type: {
name: 'Composite',
class_name: 'MessageCountDetails'
}
},
requires_duplicate_detection: {
required: false,
serialized_name: 'properties.requiresDuplicateDetection',
type: {
name: 'Boolean'
}
},
requires_session: {
required: false,
serialized_name: 'properties.requiresSession',
type: {
name: 'Boolean'
}
},
size_in_bytes: {
required: false,
read_only: true,
serialized_name: 'properties.sizeInBytes',
type: {
name: 'Number'
}
},
status: {
required: false,
serialized_name: 'properties.status',
type: {
name: 'Enum',
module: 'EntityStatus'
}
},
support_ordering: {
required: false,
serialized_name: 'properties.supportOrdering',
type: {
name: 'Boolean'
}
},
updated_at: {
required: false,
read_only: true,
serialized_name: 'properties.updatedAt',
type: {
name: 'DateTime'
}
}
}
}
}
end
end
end
end

Просмотреть файл

@ -12,7 +12,7 @@ module Azure::ARM::ServiceBus
include MsRestAzure
# @return [Array<Queue>] Result of the List Queues operation.
# @return [Array<QueueResource>] Result of the List Queues operation.
attr_accessor :value
# @return [String] Link to the next set of results. Not empty if Value
@ -25,7 +25,7 @@ module Azure::ARM::ServiceBus
#
# Gets the rest of the items for the request, enabling auto-pagination.
#
# @return [Array<Queue>] operation results.
# @return [Array<QueueResource>] operation results.
#
def get_all_items
items = @value
@ -70,10 +70,10 @@ module Azure::ARM::ServiceBus
name: 'Sequence',
element: {
required: false,
serialized_name: 'QueueElementType',
serialized_name: 'QueueResourceElementType',
type: {
name: 'Composite',
class_name: 'Queue'
class_name: 'QueueResource'
}
}
}

Просмотреть файл

@ -8,15 +8,13 @@ module Azure::ARM::ServiceBus
#
# Description of queue Resource.
#
class Queue < MsRestAzure::Resource
class QueueResource < MsRestAzure::Resource
include MsRestAzure
# @return [String] The duration of a peek-lock; that is, the amount of
# time that the message is locked for other receivers. The maximum value
# for LockDuration is 5 minutes; the default value is 1 minute. The
# service accepts a C# Standard TimeSpan Format for loc duration
# https://msdn.microsoft.com/en-us/library/ee372286(v=vs.110).aspx
# for LockDuration is 5 minutes; the default value is 1 minute.
attr_accessor :lock_duration
# @return [DateTime] Last time a message was sent, or the last time there
@ -24,31 +22,25 @@ module Azure::ARM::ServiceBus
attr_accessor :accessed_at
# @return [String] the TimeSpan idle interval after which the queue is
# automatically deleted. The minimum duration is 5 minutes. The service
# accepts a C# Standard TimeSpan Format for loc duration
# https://msdn.microsoft.com/en-us/library/ee372286(v=vs.110).aspx.
# Format is 'DD.HH:MM:SS' and default value of this property is 10675199
# days.
# automatically deleted. The minimum duration is 5 minutes.
attr_accessor :auto_delete_on_idle
# @return [DateTime] The exact time the Queue was created.
# @return [EntityAvailabilityStatus] Entity availability status for the
# queue. Possible values include: 'Available', 'Limited', 'Renaming',
# 'Restoring', 'Unknown'
attr_accessor :entity_availability_status
# @return [DateTime] The exact time the message was created.
attr_accessor :created_at
# @return [String] The default message time to live value. This is the
# duration after which the message expires, starting from when the
# message is sent to Service Bus. This is the default value used when
# TimeToLive is not set on a message itself. Format is 'DD.HH:MM:SS' and
# default value of this property is 10675199 days. The service accepts a
# C# Standard TimeSpan Format for loc duration
# https://msdn.microsoft.com/en-us/library/ee372286(v=vs.110).aspx
# TimeToLive is not set on a message itself.
attr_accessor :default_message_time_to_live
# @return [String] TimeSpan structure that defines the duration of the
# duplicate detection history. The default value is 10 minutes. The
# service accepts a C# Standard TimeSpan Format for loc duration
# https://msdn.microsoft.com/en-us/library/ee372286(v=vs.110).aspx .
# Format is 'DD.HH:MM:SS' and default value of this property is 10675199
# days
# duplicate detection history. The default value is 10 minutes.
attr_accessor :duplicate_detection_history_time_window
# @return [Boolean] A value that indicates whether server-side batched
@ -68,6 +60,10 @@ module Azure::ARM::ServiceBus
# partitioned across multiple message brokers.
attr_accessor :enable_partitioning
# @return [Boolean] A value that indicates whether the message is
# accessible anonymously.
attr_accessor :is_anonymous_accessible
# @return [Integer] The maximum delivery count. A message is
# automatically deadlettered after this number of deliveries.
attr_accessor :max_delivery_count
@ -103,21 +99,21 @@ module Azure::ARM::ServiceBus
# ordering.
attr_accessor :support_ordering
# @return [DateTime] The exact time the Queue was updated.
# @return [DateTime] The exact time the message was updated.
attr_accessor :updated_at
#
# Mapper for Queue class as Ruby Hash.
# Mapper for QueueResource class as Ruby Hash.
# This will be used for serialization/deserialization.
#
def self.mapper()
{
required: false,
serialized_name: 'Queue',
serialized_name: 'QueueResource',
type: {
name: 'Composite',
class_name: 'Queue',
class_name: 'QueueResource',
model_properties: {
id: {
required: false,
@ -165,6 +161,14 @@ module Azure::ARM::ServiceBus
name: 'String'
}
},
entity_availability_status: {
required: false,
serialized_name: 'properties.entityAvailabilityStatus',
type: {
name: 'Enum',
module: 'EntityAvailabilityStatus'
}
},
created_at: {
required: false,
read_only: true,
@ -215,6 +219,13 @@ module Azure::ARM::ServiceBus
name: 'Boolean'
}
},
is_anonymous_accessible: {
required: false,
serialized_name: 'properties.isAnonymousAccessible',
type: {
name: 'Boolean'
}
},
max_delivery_count: {
required: false,
serialized_name: 'properties.maxDeliveryCount',
@ -270,7 +281,6 @@ module Azure::ARM::ServiceBus
},
status: {
required: false,
read_only: true,
serialized_name: 'properties.status',
type: {
name: 'Enum',

Просмотреть файл

@ -31,7 +31,7 @@ module Azure::ARM::ServiceBus
model_properties: {
policykey: {
required: false,
serialized_name: 'policykey',
serialized_name: 'Policykey',
type: {
name: 'Enum',
module: 'Policykey'

Просмотреть файл

@ -24,7 +24,7 @@ module Azure::ARM::ServiceBus
# validating the SAS token.
attr_accessor :primary_key
# @return [String] A base64-encoded 256-bit secondary key for signing and
# @return [String] A base64-encoded 256-bit primary key for signing and
# validating the SAS token.
attr_accessor :secondary_key

Просмотреть файл

@ -0,0 +1,74 @@
# encoding: utf-8
# Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
module Azure::ARM::ServiceBus
module Models
#
# Parameters supplied to the Create Or Update Authorization Rules
# operation.
#
class SharedAccessAuthorizationRuleCreateOrUpdateParameters
include MsRestAzure
# @return [String] data center location.
attr_accessor :location
# @return [String] Name of the authorization rule.
attr_accessor :name
# @return [Array<AccessRights>] The rights associated with the rule.
attr_accessor :rights
#
# Mapper for SharedAccessAuthorizationRuleCreateOrUpdateParameters class
# as Ruby Hash.
# This will be used for serialization/deserialization.
#
def self.mapper()
{
required: false,
serialized_name: 'SharedAccessAuthorizationRuleCreateOrUpdateParameters',
type: {
name: 'Composite',
class_name: 'SharedAccessAuthorizationRuleCreateOrUpdateParameters',
model_properties: {
location: {
required: false,
serialized_name: 'location',
type: {
name: 'String'
}
},
name: {
required: false,
serialized_name: 'name',
type: {
name: 'String'
}
},
rights: {
required: true,
serialized_name: 'properties.rights',
type: {
name: 'Sequence',
element: {
required: false,
serialized_name: 'AccessRightsElementType',
type: {
name: 'Enum',
module: 'AccessRights'
}
}
}
}
}
}
}
end
end
end
end

Просмотреть файл

@ -12,8 +12,8 @@ module Azure::ARM::ServiceBus
include MsRestAzure
# @return [Array<SharedAccessAuthorizationRule>] Result of the List
# Authorization Rules operation.
# @return [Array<SharedAccessAuthorizationRuleResource>] Result of the
# List Authorization Rules operation.
attr_accessor :value
# @return [String] Link to the next set of results. Not empty if Value
@ -26,7 +26,8 @@ module Azure::ARM::ServiceBus
#
# Gets the rest of the items for the request, enabling auto-pagination.
#
# @return [Array<SharedAccessAuthorizationRule>] operation results.
# @return [Array<SharedAccessAuthorizationRuleResource>] operation
# results.
#
def get_all_items
items = @value
@ -72,10 +73,10 @@ module Azure::ARM::ServiceBus
name: 'Sequence',
element: {
required: false,
serialized_name: 'SharedAccessAuthorizationRuleElementType',
serialized_name: 'SharedAccessAuthorizationRuleResourceElementType',
type: {
name: 'Composite',
class_name: 'SharedAccessAuthorizationRule'
class_name: 'SharedAccessAuthorizationRuleResource'
}
}
}

Просмотреть файл

@ -8,7 +8,7 @@ module Azure::ARM::ServiceBus
#
# Description of a namespace authorization rule.
#
class SharedAccessAuthorizationRule < MsRestAzure::Resource
class SharedAccessAuthorizationRuleResource < MsRestAzure::Resource
include MsRestAzure
@ -17,16 +17,16 @@ module Azure::ARM::ServiceBus
#
# Mapper for SharedAccessAuthorizationRule class as Ruby Hash.
# Mapper for SharedAccessAuthorizationRuleResource class as Ruby Hash.
# This will be used for serialization/deserialization.
#
def self.mapper()
{
required: false,
serialized_name: 'SharedAccessAuthorizationRule',
serialized_name: 'SharedAccessAuthorizationRuleResource',
type: {
name: 'Composite',
class_name: 'SharedAccessAuthorizationRule',
class_name: 'SharedAccessAuthorizationRuleResource',
model_properties: {
id: {
required: false,

Просмотреть файл

@ -20,8 +20,7 @@ module Azure::ARM::ServiceBus
# values include: 'Basic', 'Standard', 'Premium'
attr_accessor :tier
# @return [Integer] The specified messaging units for the tier. For
# Premium tier, capacity are 1,2 and 4.
# @return [Integer] The specified messaging units for the tier.
attr_accessor :capacity

Просмотреть файл

@ -0,0 +1,237 @@
# encoding: utf-8
# Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
module Azure::ARM::ServiceBus
module Models
#
# Parameters supplied to the Create Or Update Subscription operation.
#
class SubscriptionCreateOrUpdateParameters
include MsRestAzure
# @return [String] Subscription data center location.
attr_accessor :location
# @return [String] Resource manager type of the resource.
attr_accessor :type
# @return [DateTime] Last time there was a receive request to this
# subscription.
attr_accessor :accessed_at
# @return [String] TimeSpan idle interval after which the topic is
# automatically deleted. The minimum duration is 5 minutes.
attr_accessor :auto_delete_on_idle
# @return [MessageCountDetails]
attr_accessor :count_details
# @return [DateTime] Exact time the message was created.
attr_accessor :created_at
# @return [String] Default message time to live value. This is the
# duration after which the message expires, starting from when the
# message is sent to Service Bus. This is the default value used when
# TimeToLive is not set on a message itself.
attr_accessor :default_message_time_to_live
# @return [Boolean] Value that indicates whether a subscription has dead
# letter support on filter evaluation exceptions.
attr_accessor :dead_lettering_on_filter_evaluation_exceptions
# @return [Boolean] Value that indicates whether a subscription has dead
# letter support when a message expires.
attr_accessor :dead_lettering_on_message_expiration
# @return [Boolean] Value that indicates whether server-side batched
# operations are enabled.
attr_accessor :enable_batched_operations
# @return [EntityAvailabilityStatus] Entity availability status for the
# topic. Possible values include: 'Available', 'Limited', 'Renaming',
# 'Restoring', 'Unknown'
attr_accessor :entity_availability_status
# @return [Boolean] Value that indicates whether the entity description
# is read-only.
attr_accessor :is_read_only
# @return [String] The lock duration time span for the subscription.
attr_accessor :lock_duration
# @return [Integer] Number of maximum deliveries.
attr_accessor :max_delivery_count
# @return [Integer] Number of messages.
attr_accessor :message_count
# @return [Boolean] Value indicating if a subscription supports the
# concept of sessions.
attr_accessor :requires_session
# @return [EntityStatus] Enumerates the possible values for the status of
# a messaging entity. Possible values include: 'Active', 'Creating',
# 'Deleting', 'Disabled', 'ReceiveDisabled', 'Renaming', 'Restoring',
# 'SendDisabled', 'Unknown'
attr_accessor :status
# @return [DateTime] The exact time the message was updated.
attr_accessor :updated_at
#
# Mapper for SubscriptionCreateOrUpdateParameters class as Ruby Hash.
# This will be used for serialization/deserialization.
#
def self.mapper()
{
required: false,
serialized_name: 'SubscriptionCreateOrUpdateParameters',
type: {
name: 'Composite',
class_name: 'SubscriptionCreateOrUpdateParameters',
model_properties: {
location: {
required: true,
serialized_name: 'location',
type: {
name: 'String'
}
},
type: {
required: false,
serialized_name: 'type',
type: {
name: 'String'
}
},
accessed_at: {
required: false,
read_only: true,
serialized_name: 'properties.accessedAt',
type: {
name: 'DateTime'
}
},
auto_delete_on_idle: {
required: false,
serialized_name: 'properties.autoDeleteOnIdle',
type: {
name: 'String'
}
},
count_details: {
required: false,
read_only: true,
serialized_name: 'properties.countDetails',
type: {
name: 'Composite',
class_name: 'MessageCountDetails'
}
},
created_at: {
required: false,
read_only: true,
serialized_name: 'properties.createdAt',
type: {
name: 'DateTime'
}
},
default_message_time_to_live: {
required: false,
serialized_name: 'properties.defaultMessageTimeToLive',
type: {
name: 'String'
}
},
dead_lettering_on_filter_evaluation_exceptions: {
required: false,
serialized_name: 'properties.deadLetteringOnFilterEvaluationExceptions',
type: {
name: 'Boolean'
}
},
dead_lettering_on_message_expiration: {
required: false,
serialized_name: 'properties.deadLetteringOnMessageExpiration',
type: {
name: 'Boolean'
}
},
enable_batched_operations: {
required: false,
serialized_name: 'properties.enableBatchedOperations',
type: {
name: 'Boolean'
}
},
entity_availability_status: {
required: false,
serialized_name: 'properties.entityAvailabilityStatus',
type: {
name: 'Enum',
module: 'EntityAvailabilityStatus'
}
},
is_read_only: {
required: false,
serialized_name: 'properties.isReadOnly',
type: {
name: 'Boolean'
}
},
lock_duration: {
required: false,
serialized_name: 'properties.lockDuration',
type: {
name: 'String'
}
},
max_delivery_count: {
required: false,
serialized_name: 'properties.maxDeliveryCount',
type: {
name: 'Number'
}
},
message_count: {
required: false,
read_only: true,
serialized_name: 'properties.messageCount',
type: {
name: 'Number'
}
},
requires_session: {
required: false,
serialized_name: 'properties.requiresSession',
type: {
name: 'Boolean'
}
},
status: {
required: false,
serialized_name: 'properties.status',
type: {
name: 'Enum',
module: 'EntityStatus'
}
},
updated_at: {
required: false,
read_only: true,
serialized_name: 'properties.updatedAt',
type: {
name: 'DateTime'
}
}
}
}
}
end
end
end
end

Просмотреть файл

@ -12,7 +12,7 @@ module Azure::ARM::ServiceBus
include MsRestAzure
# @return [Array<Subscription>] Result of the List Subscriptions
# @return [Array<SubscriptionResource>] Result of the List Subscriptions
# operation.
attr_accessor :value
@ -26,7 +26,7 @@ module Azure::ARM::ServiceBus
#
# Gets the rest of the items for the request, enabling auto-pagination.
#
# @return [Array<Subscription>] operation results.
# @return [Array<SubscriptionResource>] operation results.
#
def get_all_items
items = @value
@ -71,10 +71,10 @@ module Azure::ARM::ServiceBus
name: 'Sequence',
element: {
required: false,
serialized_name: 'SubscriptionElementType',
serialized_name: 'SubscriptionResourceElementType',
type: {
name: 'Composite',
class_name: 'Subscription'
class_name: 'SubscriptionResource'
}
}
}

Просмотреть файл

@ -8,7 +8,7 @@ module Azure::ARM::ServiceBus
#
# Description of subscription resource.
#
class Subscription < MsRestAzure::Resource
class SubscriptionResource < MsRestAzure::Resource
include MsRestAzure
@ -17,27 +17,19 @@ module Azure::ARM::ServiceBus
attr_accessor :accessed_at
# @return [String] TimeSpan idle interval after which the topic is
# automatically deleted. The minimum duration is 5 minutes. The service
# accepts a C# Standard TimeSpan Format for loc duration
# https://msdn.microsoft.com/en-us/library/ee372286(v=vs.110).aspx.
# Format is 'DD.HH:MM:SS' and default value of this property is 10675199
# days
# automatically deleted. The minimum duration is 5 minutes.
attr_accessor :auto_delete_on_idle
# @return [MessageCountDetails]
attr_accessor :count_details
# @return [DateTime] Exact time the Subscription was created.
# @return [DateTime] Exact time the message was created.
attr_accessor :created_at
# @return [String] Default message time to live value. This is the
# duration after which the message expires, starting from when the
# message is sent to Service Bus. This is the default value used when
# TimeToLive is not set on a message itself. The service accepts a C#
# Standard TimeSpan Format for loc duration
# https://msdn.microsoft.com/en-us/library/ee372286(v=vs.110).aspx .
# Format is 'DD.HH:MM:SS' and default value of this property is 10675199
# days
# TimeToLive is not set on a message itself.
attr_accessor :default_message_time_to_live
# @return [Boolean] Value that indicates whether a subscription has dead
@ -52,9 +44,16 @@ module Azure::ARM::ServiceBus
# operations are enabled.
attr_accessor :enable_batched_operations
# @return [String] The lock duration time span for the subscription. The
# service accepts a C# Standard TimeSpan Format for loc duration
# https://msdn.microsoft.com/en-us/library/ee372286(v=vs.110).aspx
# @return [EntityAvailabilityStatus] Entity availability status for the
# topic. Possible values include: 'Available', 'Limited', 'Renaming',
# 'Restoring', 'Unknown'
attr_accessor :entity_availability_status
# @return [Boolean] Value that indicates whether the entity description
# is read-only.
attr_accessor :is_read_only
# @return [String] The lock duration time span for the subscription.
attr_accessor :lock_duration
# @return [Integer] Number of maximum deliveries.
@ -73,21 +72,21 @@ module Azure::ARM::ServiceBus
# 'SendDisabled', 'Unknown'
attr_accessor :status
# @return [DateTime] The exact time the subscription was updated.
# @return [DateTime] The exact time the message was updated.
attr_accessor :updated_at
#
# Mapper for Subscription class as Ruby Hash.
# Mapper for SubscriptionResource class as Ruby Hash.
# This will be used for serialization/deserialization.
#
def self.mapper()
{
required: false,
serialized_name: 'Subscription',
serialized_name: 'SubscriptionResource',
type: {
name: 'Composite',
class_name: 'Subscription',
class_name: 'SubscriptionResource',
model_properties: {
id: {
required: false,
@ -173,6 +172,21 @@ module Azure::ARM::ServiceBus
name: 'Boolean'
}
},
entity_availability_status: {
required: false,
serialized_name: 'properties.entityAvailabilityStatus',
type: {
name: 'Enum',
module: 'EntityAvailabilityStatus'
}
},
is_read_only: {
required: false,
serialized_name: 'properties.isReadOnly',
type: {
name: 'Boolean'
}
},
lock_duration: {
required: false,
serialized_name: 'properties.lockDuration',

Просмотреть файл

@ -0,0 +1,294 @@
# encoding: utf-8
# Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
module Azure::ARM::ServiceBus
module Models
#
# Parameters supplied to the Create Or Update Topic operation.
#
class TopicCreateOrUpdateParameters
include MsRestAzure
# @return [String] Topic name.
attr_accessor :name
# @return [String] Location of the resource.
attr_accessor :location
# @return [DateTime] Last time the message was sent, or a request was
# received, for this topic.
attr_accessor :accessed_at
# @return [String] TimeSpan idle interval after which the topic is
# automatically deleted. The minimum duration is 5 minutes.
attr_accessor :auto_delete_on_idle
# @return [EntityAvailabilityStatus] Entity availability status for the
# topic. Possible values include: 'Available', 'Limited', 'Renaming',
# 'Restoring', 'Unknown'
attr_accessor :entity_availability_status
# @return [DateTime] Exact time the message was created.
attr_accessor :created_at
# @return [MessageCountDetails]
attr_accessor :count_details
# @return [String] Default message time to live value. This is the
# duration after which the message expires, starting from when the
# message is sent to Service Bus. This is the default value used when
# TimeToLive is not set on a message itself.
attr_accessor :default_message_time_to_live
# @return [String] TimeSpan structure that defines the duration of the
# duplicate detection history. The default value is 10 minutes.
attr_accessor :duplicate_detection_history_time_window
# @return [Boolean] Value that indicates whether server-side batched
# operations are enabled.
attr_accessor :enable_batched_operations
# @return [Boolean] Value that indicates whether Express Entities are
# enabled. An express topic holds a message in memory temporarily before
# writing it to persistent storage.
attr_accessor :enable_express
# @return [Boolean] Value that indicates whether the topic to be
# partitioned across multiple message brokers is enabled.
attr_accessor :enable_partitioning
# @return [Boolean] Value that indicates whether partitioning is enabled
# or disabled.
attr_accessor :enable_subscription_partitioning
# @return [Boolean] Whether messages should be filtered before
# publishing.
attr_accessor :filtering_messages_before_publishing
# @return [Boolean] Value that indicates whether the message is
# accessible anonymously.
attr_accessor :is_anonymous_accessible
# @return [Boolean]
attr_accessor :is_express
# @return [Integer] Maximum size of the topic in megabytes, which is the
# size of the memory allocated for the topic.
attr_accessor :max_size_in_megabytes
# @return [Boolean] Value indicating if this topic requires duplicate
# detection.
attr_accessor :requires_duplicate_detection
# @return [Integer] Size of the topic, in bytes.
attr_accessor :size_in_bytes
# @return [EntityStatus] Enumerates the possible values for the status of
# a messaging entity. Possible values include: 'Active', 'Creating',
# 'Deleting', 'Disabled', 'ReceiveDisabled', 'Renaming', 'Restoring',
# 'SendDisabled', 'Unknown'
attr_accessor :status
# @return [Integer] Number of subscriptions.
attr_accessor :subscription_count
# @return [Boolean] Value that indicates whether the topic supports
# ordering.
attr_accessor :support_ordering
# @return [DateTime] The exact time the message was updated.
attr_accessor :updated_at
#
# Mapper for TopicCreateOrUpdateParameters class as Ruby Hash.
# This will be used for serialization/deserialization.
#
def self.mapper()
{
required: false,
serialized_name: 'TopicCreateOrUpdateParameters',
type: {
name: 'Composite',
class_name: 'TopicCreateOrUpdateParameters',
model_properties: {
name: {
required: false,
serialized_name: 'name',
type: {
name: 'String'
}
},
location: {
required: true,
serialized_name: 'location',
type: {
name: 'String'
}
},
accessed_at: {
required: false,
read_only: true,
serialized_name: 'properties.accessedAt',
type: {
name: 'DateTime'
}
},
auto_delete_on_idle: {
required: false,
serialized_name: 'properties.autoDeleteOnIdle',
type: {
name: 'String'
}
},
entity_availability_status: {
required: false,
serialized_name: 'properties.entityAvailabilityStatus',
type: {
name: 'Enum',
module: 'EntityAvailabilityStatus'
}
},
created_at: {
required: false,
read_only: true,
serialized_name: 'properties.createdAt',
type: {
name: 'DateTime'
}
},
count_details: {
required: false,
read_only: true,
serialized_name: 'properties.countDetails',
type: {
name: 'Composite',
class_name: 'MessageCountDetails'
}
},
default_message_time_to_live: {
required: false,
serialized_name: 'properties.defaultMessageTimeToLive',
type: {
name: 'String'
}
},
duplicate_detection_history_time_window: {
required: false,
serialized_name: 'properties.duplicateDetectionHistoryTimeWindow',
type: {
name: 'String'
}
},
enable_batched_operations: {
required: false,
serialized_name: 'properties.enableBatchedOperations',
type: {
name: 'Boolean'
}
},
enable_express: {
required: false,
serialized_name: 'properties.enableExpress',
type: {
name: 'Boolean'
}
},
enable_partitioning: {
required: false,
serialized_name: 'properties.enablePartitioning',
type: {
name: 'Boolean'
}
},
enable_subscription_partitioning: {
required: false,
serialized_name: 'properties.enableSubscriptionPartitioning',
type: {
name: 'Boolean'
}
},
filtering_messages_before_publishing: {
required: false,
serialized_name: 'properties.filteringMessagesBeforePublishing',
type: {
name: 'Boolean'
}
},
is_anonymous_accessible: {
required: false,
serialized_name: 'properties.isAnonymousAccessible',
type: {
name: 'Boolean'
}
},
is_express: {
required: false,
serialized_name: 'properties.isExpress',
type: {
name: 'Boolean'
}
},
max_size_in_megabytes: {
required: false,
serialized_name: 'properties.maxSizeInMegabytes',
type: {
name: 'Number'
}
},
requires_duplicate_detection: {
required: false,
serialized_name: 'properties.requiresDuplicateDetection',
type: {
name: 'Boolean'
}
},
size_in_bytes: {
required: false,
read_only: true,
serialized_name: 'properties.sizeInBytes',
type: {
name: 'Number'
}
},
status: {
required: false,
serialized_name: 'properties.status',
type: {
name: 'Enum',
module: 'EntityStatus'
}
},
subscription_count: {
required: false,
read_only: true,
serialized_name: 'properties.subscriptionCount',
type: {
name: 'Number'
}
},
support_ordering: {
required: false,
serialized_name: 'properties.supportOrdering',
type: {
name: 'Boolean'
}
},
updated_at: {
required: false,
read_only: true,
serialized_name: 'properties.updatedAt',
type: {
name: 'DateTime'
}
}
}
}
}
end
end
end
end

Просмотреть файл

@ -12,7 +12,7 @@ module Azure::ARM::ServiceBus
include MsRestAzure
# @return [Array<Topic>] Result of the List Topics operation.
# @return [Array<TopicResource>] Result of the List Topics operation.
attr_accessor :value
# @return [String] Link to the next set of results. Not empty if Value
@ -25,7 +25,7 @@ module Azure::ARM::ServiceBus
#
# Gets the rest of the items for the request, enabling auto-pagination.
#
# @return [Array<Topic>] operation results.
# @return [Array<TopicResource>] operation results.
#
def get_all_items
items = @value
@ -70,10 +70,10 @@ module Azure::ARM::ServiceBus
name: 'Sequence',
element: {
required: false,
serialized_name: 'TopicElementType',
serialized_name: 'TopicResourceElementType',
type: {
name: 'Composite',
class_name: 'Topic'
class_name: 'TopicResource'
}
}
}

Просмотреть файл

@ -8,7 +8,7 @@ module Azure::ARM::ServiceBus
#
# Description of topic resource.
#
class Topic < MsRestAzure::Resource
class TopicResource < MsRestAzure::Resource
include MsRestAzure
@ -17,14 +17,15 @@ module Azure::ARM::ServiceBus
attr_accessor :accessed_at
# @return [String] TimeSpan idle interval after which the topic is
# automatically deleted. The minimum duration is 5 minutes. The service
# accepts a C# Standard TimeSpan Format for loc duration
# https://msdn.microsoft.com/en-us/library/ee372286(v=vs.110).aspx .
# Format is 'DD.HH:MM:SS' and default value of this property is 10675199
# days
# automatically deleted. The minimum duration is 5 minutes.
attr_accessor :auto_delete_on_idle
# @return [DateTime] Exact time the Tpoic was created.
# @return [EntityAvailabilityStatus] Entity availability status for the
# topic. Possible values include: 'Available', 'Limited', 'Renaming',
# 'Restoring', 'Unknown'
attr_accessor :entity_availability_status
# @return [DateTime] Exact time the message was created.
attr_accessor :created_at
# @return [MessageCountDetails]
@ -33,19 +34,11 @@ module Azure::ARM::ServiceBus
# @return [String] Default message time to live value. This is the
# duration after which the message expires, starting from when the
# message is sent to Service Bus. This is the default value used when
# TimeToLive is not set on a message itself. The service accepts a C#
# Standard TimeSpan Format for loc duration
# https://msdn.microsoft.com/en-us/library/ee372286(v=vs.110).aspx .
# Format is 'DD.HH:MM:SS' and default value of this property is 10675199
# days
# TimeToLive is not set on a message itself.
attr_accessor :default_message_time_to_live
# @return [String] TimeSpan structure that defines the duration of the
# duplicate detection history. The default value is 10 minutes. The
# service accepts a C# Standard TimeSpan Format for loc duration
# https://msdn.microsoft.com/en-us/library/ee372286(v=vs.110).aspx .
# Format is 'DD.HH:MM:SS' and default value of this property is 10675199
# days
# duplicate detection history. The default value is 10 minutes.
attr_accessor :duplicate_detection_history_time_window
# @return [Boolean] Value that indicates whether server-side batched
@ -61,6 +54,21 @@ module Azure::ARM::ServiceBus
# partitioned across multiple message brokers is enabled.
attr_accessor :enable_partitioning
# @return [Boolean] Value that indicates whether partitioning is enabled
# or disabled.
attr_accessor :enable_subscription_partitioning
# @return [Boolean] Whether messages should be filtered before
# publishing.
attr_accessor :filtering_messages_before_publishing
# @return [Boolean] Value that indicates whether the message is
# accessible anonymously.
attr_accessor :is_anonymous_accessible
# @return [Boolean]
attr_accessor :is_express
# @return [Integer] Maximum size of the topic in megabytes, which is the
# size of the memory allocated for the topic.
attr_accessor :max_size_in_megabytes
@ -85,21 +93,21 @@ module Azure::ARM::ServiceBus
# ordering.
attr_accessor :support_ordering
# @return [DateTime] The exact time the Topic was updated.
# @return [DateTime] The exact time the message was updated.
attr_accessor :updated_at
#
# Mapper for Topic class as Ruby Hash.
# Mapper for TopicResource class as Ruby Hash.
# This will be used for serialization/deserialization.
#
def self.mapper()
{
required: false,
serialized_name: 'Topic',
serialized_name: 'TopicResource',
type: {
name: 'Composite',
class_name: 'Topic',
class_name: 'TopicResource',
model_properties: {
id: {
required: false,
@ -140,6 +148,14 @@ module Azure::ARM::ServiceBus
name: 'String'
}
},
entity_availability_status: {
required: false,
serialized_name: 'properties.entityAvailabilityStatus',
type: {
name: 'Enum',
module: 'EntityAvailabilityStatus'
}
},
created_at: {
required: false,
read_only: true,
@ -192,6 +208,34 @@ module Azure::ARM::ServiceBus
name: 'Boolean'
}
},
enable_subscription_partitioning: {
required: false,
serialized_name: 'properties.enableSubscriptionPartitioning',
type: {
name: 'Boolean'
}
},
filtering_messages_before_publishing: {
required: false,
serialized_name: 'properties.filteringMessagesBeforePublishing',
type: {
name: 'Boolean'
}
},
is_anonymous_accessible: {
required: false,
serialized_name: 'properties.isAnonymousAccessible',
type: {
name: 'Boolean'
}
},
is_express: {
required: false,
serialized_name: 'properties.isExpress',
type: {
name: 'Boolean'
}
},
max_size_in_megabytes: {
required: false,
serialized_name: 'properties.maxSizeInMegabytes',
@ -216,7 +260,6 @@ module Azure::ARM::ServiceBus
},
status: {
required: false,
read_only: true,
serialized_name: 'properties.status',
type: {
name: 'Enum',

Просмотреть файл

@ -8,7 +8,6 @@ module Azure::ARM::ServiceBus
# Azure Service Bus client
#
class Namespaces
include Azure::ARM::ServiceBus::Models
include MsRestAzure
#
@ -76,7 +75,7 @@ module Azure::ARM::ServiceBus
request_headers['Content-Type'] = 'application/json; charset=utf-8'
# Serialize Request
request_mapper = CheckNameAvailability.mapper()
request_mapper = Azure::ARM::ServiceBus::Models::CheckNameAvailability.mapper()
request_content = @client.serialize(request_mapper, parameters, 'parameters')
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
@ -108,7 +107,7 @@ module Azure::ARM::ServiceBus
if status_code == 200
begin
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
result_mapper = CheckNameAvailabilityResult.mapper()
result_mapper = Azure::ARM::ServiceBus::Models::CheckNameAvailabilityResult.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)
@ -128,10 +127,10 @@ module Azure::ARM::ServiceBus
# @param custom_headers [Hash{String => String}] A hash of custom headers that
# will be added to the HTTP request.
#
# @return [Array<Namespace>] operation results.
# @return [Array<NamespaceResource>] operation results.
#
def list(custom_headers = nil)
first_page = list_as_lazy(custom_headers)
def list_by_subscription(custom_headers = nil)
first_page = list_by_subscription_as_lazy(custom_headers)
first_page.get_all_items
end
@ -144,8 +143,8 @@ module Azure::ARM::ServiceBus
#
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
#
def list_with_http_info(custom_headers = nil)
list_async(custom_headers).value!
def list_by_subscription_with_http_info(custom_headers = nil)
list_by_subscription_async(custom_headers).value!
end
#
@ -157,7 +156,7 @@ module Azure::ARM::ServiceBus
#
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
#
def list_async(custom_headers = nil)
def list_by_subscription_async(custom_headers = 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?
@ -194,7 +193,7 @@ module Azure::ARM::ServiceBus
if status_code == 200
begin
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
result_mapper = NamespaceListResult.mapper()
result_mapper = Azure::ARM::ServiceBus::Models::NamespaceListResult.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)
@ -215,7 +214,7 @@ module Azure::ARM::ServiceBus
# @param custom_headers [Hash{String => String}] A hash of custom headers that
# will be added to the HTTP request.
#
# @return [Array<Namespace>] operation results.
# @return [Array<NamespaceResource>] operation results.
#
def list_by_resource_group(resource_group_name, custom_headers = nil)
first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers)
@ -284,7 +283,7 @@ module Azure::ARM::ServiceBus
if status_code == 200
begin
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
result_mapper = NamespaceListResult.mapper()
result_mapper = Azure::ARM::ServiceBus::Models::NamespaceListResult.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)
@ -303,13 +302,13 @@ module Azure::ARM::ServiceBus
#
# @param resource_group_name [String] Name of the Resource group within the
# Azure subscription.
# @param namespace_name [String] The namespace name
# @param parameters [Namespace] Parameters supplied to create a namespace
# resource.
# @param namespace_name [String] The namespace name.
# @param parameters [NamespaceCreateOrUpdateParameters] Parameters supplied to
# create a namespace resource.
# @param custom_headers [Hash{String => String}] A hash of custom headers that
# will be added to the HTTP request.
#
# @return [Namespace] operation results.
# @return [NamespaceResource] operation results.
#
def create_or_update(resource_group_name, namespace_name, parameters, custom_headers = nil)
response = create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers).value!
@ -319,9 +318,9 @@ module Azure::ARM::ServiceBus
#
# @param resource_group_name [String] Name of the Resource group within the
# Azure subscription.
# @param namespace_name [String] The namespace name
# @param parameters [Namespace] Parameters supplied to create a namespace
# resource.
# @param namespace_name [String] The namespace name.
# @param parameters [NamespaceCreateOrUpdateParameters] Parameters supplied to
# create a namespace resource.
# @param custom_headers [Hash{String => String}] A hash of custom headers that
# will be added to the HTTP request.
#
@ -335,7 +334,7 @@ module Azure::ARM::ServiceBus
promise = promise.then do |response|
# Defining deserialization method.
deserialize_method = lambda do |parsed_response|
result_mapper = Namespace.mapper()
result_mapper = Azure::ARM::ServiceBus::Models::NamespaceResource.mapper()
parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
end
@ -396,7 +395,7 @@ module Azure::ARM::ServiceBus
# @param custom_headers [Hash{String => String}] A hash of custom headers that
# will be added to the HTTP request.
#
# @return [Namespace] operation results.
# @return [NamespaceResource] operation results.
#
def get(resource_group_name, namespace_name, custom_headers = nil)
response = get_async(resource_group_name, namespace_name, custom_headers).value!
@ -468,7 +467,7 @@ module Azure::ARM::ServiceBus
if status_code == 200
begin
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
result_mapper = Namespace.mapper()
result_mapper = Azure::ARM::ServiceBus::Models::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)
@ -493,7 +492,7 @@ module Azure::ARM::ServiceBus
# @param custom_headers [Hash{String => String}] A hash of custom headers that
# will be added to the HTTP request.
#
# @return [Namespace] operation results.
# @return [NamespaceResource] operation results.
#
def update(resource_group_name, namespace_name, parameters, custom_headers = nil)
response = update_async(resource_group_name, namespace_name, parameters, custom_headers).value!
@ -549,7 +548,7 @@ module Azure::ARM::ServiceBus
request_headers['Content-Type'] = 'application/json; charset=utf-8'
# Serialize Request
request_mapper = NamespaceUpdateParameters.mapper()
request_mapper = Azure::ARM::ServiceBus::Models::NamespaceUpdateParameters.mapper()
request_content = @client.serialize(request_mapper, parameters, 'parameters')
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
@ -581,7 +580,7 @@ module Azure::ARM::ServiceBus
if status_code == 201
begin
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
result_mapper = Namespace.mapper()
result_mapper = Azure::ARM::ServiceBus::Models::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)
@ -591,7 +590,7 @@ module Azure::ARM::ServiceBus
if status_code == 200
begin
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
result_mapper = Namespace.mapper()
result_mapper = Azure::ARM::ServiceBus::Models::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)
@ -613,7 +612,7 @@ module Azure::ARM::ServiceBus
# @param custom_headers [Hash{String => String}] A hash of custom headers that
# will be added to the HTTP request.
#
# @return [Array<SharedAccessAuthorizationRule>] operation results.
# @return [Array<SharedAccessAuthorizationRuleResource>] operation results.
#
def list_authorization_rules(resource_group_name, namespace_name, custom_headers = nil)
first_page = list_authorization_rules_as_lazy(resource_group_name, namespace_name, custom_headers)
@ -685,7 +684,7 @@ module Azure::ARM::ServiceBus
if status_code == 200
begin
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
result_mapper = SharedAccessAuthorizationRuleListResult.mapper()
result_mapper = Azure::ARM::ServiceBus::Models::SharedAccessAuthorizationRuleListResult.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)
@ -705,12 +704,12 @@ module Azure::ARM::ServiceBus
# Azure subscription.
# @param namespace_name [String] The namespace name
# @param authorization_rule_name [String] The authorizationrule name.
# @param parameters [SharedAccessAuthorizationRule] The shared access
# authorization rule.
# @param parameters [SharedAccessAuthorizationRuleCreateOrUpdateParameters] The
# shared access authorization rule.
# @param custom_headers [Hash{String => String}] A hash of custom headers that
# will be added to the HTTP request.
#
# @return [SharedAccessAuthorizationRule] operation results.
# @return [SharedAccessAuthorizationRuleResource] operation results.
#
def create_or_update_authorization_rule(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers = nil)
response = create_or_update_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers).value!
@ -724,8 +723,8 @@ module Azure::ARM::ServiceBus
# Azure subscription.
# @param namespace_name [String] The namespace name
# @param authorization_rule_name [String] The authorizationrule name.
# @param parameters [SharedAccessAuthorizationRule] The shared access
# authorization rule.
# @param parameters [SharedAccessAuthorizationRuleCreateOrUpdateParameters] The
# shared access authorization rule.
# @param custom_headers [Hash{String => String}] A hash of custom headers that
# will be added to the HTTP request.
#
@ -742,8 +741,8 @@ module Azure::ARM::ServiceBus
# Azure subscription.
# @param namespace_name [String] The namespace name
# @param authorization_rule_name [String] The authorizationrule name.
# @param parameters [SharedAccessAuthorizationRule] The shared access
# authorization rule.
# @param parameters [SharedAccessAuthorizationRuleCreateOrUpdateParameters] The
# shared access authorization rule.
# @param [Hash{String => String}] A hash of custom headers that will be added
# to the HTTP request.
#
@ -767,7 +766,7 @@ module Azure::ARM::ServiceBus
request_headers['Content-Type'] = 'application/json; charset=utf-8'
# Serialize Request
request_mapper = SharedAccessAuthorizationRule.mapper()
request_mapper = Azure::ARM::ServiceBus::Models::SharedAccessAuthorizationRuleCreateOrUpdateParameters.mapper()
request_content = @client.serialize(request_mapper, parameters, 'parameters')
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
@ -799,7 +798,7 @@ module Azure::ARM::ServiceBus
if status_code == 200
begin
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
result_mapper = SharedAccessAuthorizationRule.mapper()
result_mapper = Azure::ARM::ServiceBus::Models::SharedAccessAuthorizationRuleResource.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)
@ -909,7 +908,7 @@ module Azure::ARM::ServiceBus
# @param custom_headers [Hash{String => String}] A hash of custom headers that
# will be added to the HTTP request.
#
# @return [SharedAccessAuthorizationRule] operation results.
# @return [SharedAccessAuthorizationRuleResource] operation results.
#
def get_authorization_rule(resource_group_name, namespace_name, authorization_rule_name, custom_headers = nil)
response = get_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers).value!
@ -984,7 +983,7 @@ module Azure::ARM::ServiceBus
if status_code == 200
begin
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
result_mapper = SharedAccessAuthorizationRule.mapper()
result_mapper = Azure::ARM::ServiceBus::Models::SharedAccessAuthorizationRuleResource.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)
@ -1082,7 +1081,7 @@ module Azure::ARM::ServiceBus
if status_code == 200
begin
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
result_mapper = ResourceListKeys.mapper()
result_mapper = Azure::ARM::ServiceBus::Models::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)
@ -1164,7 +1163,7 @@ module Azure::ARM::ServiceBus
request_headers['Content-Type'] = 'application/json; charset=utf-8'
# Serialize Request
request_mapper = RegenerateKeysParameters.mapper()
request_mapper = Azure::ARM::ServiceBus::Models::RegenerateKeysParameters.mapper()
request_content = @client.serialize(request_mapper, parameters, 'parameters')
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
@ -1196,7 +1195,7 @@ module Azure::ARM::ServiceBus
if status_code == 200
begin
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
result_mapper = ResourceListKeys.mapper()
result_mapper = Azure::ARM::ServiceBus::Models::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)
@ -1215,13 +1214,13 @@ module Azure::ARM::ServiceBus
#
# @param resource_group_name [String] Name of the Resource group within the
# Azure subscription.
# @param namespace_name [String] The namespace name
# @param parameters [Namespace] Parameters supplied to create a namespace
# resource.
# @param namespace_name [String] The namespace name.
# @param parameters [NamespaceCreateOrUpdateParameters] Parameters supplied to
# create a namespace resource.
# @param custom_headers [Hash{String => String}] A hash of custom headers that
# will be added to the HTTP request.
#
# @return [Namespace] operation results.
# @return [NamespaceResource] operation results.
#
def begin_create_or_update(resource_group_name, namespace_name, parameters, custom_headers = nil)
response = begin_create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers).value!
@ -1234,9 +1233,9 @@ module Azure::ARM::ServiceBus
#
# @param resource_group_name [String] Name of the Resource group within the
# Azure subscription.
# @param namespace_name [String] The namespace name
# @param parameters [Namespace] Parameters supplied to create a namespace
# resource.
# @param namespace_name [String] The namespace name.
# @param parameters [NamespaceCreateOrUpdateParameters] Parameters supplied to
# create a namespace resource.
# @param custom_headers [Hash{String => String}] A hash of custom headers that
# will be added to the HTTP request.
#
@ -1252,9 +1251,9 @@ module Azure::ARM::ServiceBus
#
# @param resource_group_name [String] Name of the Resource group within the
# Azure subscription.
# @param namespace_name [String] The namespace name
# @param parameters [Namespace] Parameters supplied to create a namespace
# resource.
# @param namespace_name [String] The namespace name.
# @param parameters [NamespaceCreateOrUpdateParameters] Parameters supplied to
# create a namespace resource.
# @param [Hash{String => String}] A hash of custom headers that will be added
# to the HTTP request.
#
@ -1277,7 +1276,7 @@ module Azure::ARM::ServiceBus
request_headers['Content-Type'] = 'application/json; charset=utf-8'
# Serialize Request
request_mapper = Namespace.mapper()
request_mapper = Azure::ARM::ServiceBus::Models::NamespaceCreateOrUpdateParameters.mapper()
request_content = @client.serialize(request_mapper, parameters, 'parameters')
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
@ -1309,7 +1308,7 @@ module Azure::ARM::ServiceBus
if status_code == 201
begin
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
result_mapper = Namespace.mapper()
result_mapper = Azure::ARM::ServiceBus::Models::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)
@ -1319,7 +1318,7 @@ module Azure::ARM::ServiceBus
if status_code == 200
begin
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
result_mapper = Namespace.mapper()
result_mapper = Azure::ARM::ServiceBus::Models::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)
@ -1429,8 +1428,8 @@ module Azure::ARM::ServiceBus
#
# @return [NamespaceListResult] operation results.
#
def list_next(next_page_link, custom_headers = nil)
response = list_next_async(next_page_link, custom_headers).value!
def list_by_subscription_next(next_page_link, custom_headers = nil)
response = list_by_subscription_next_async(next_page_link, custom_headers).value!
response.body unless response.nil?
end
@ -1445,8 +1444,8 @@ module Azure::ARM::ServiceBus
#
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
#
def list_next_with_http_info(next_page_link, custom_headers = nil)
list_next_async(next_page_link, custom_headers).value!
def list_by_subscription_next_with_http_info(next_page_link, custom_headers = nil)
list_by_subscription_next_async(next_page_link, custom_headers).value!
end
#
@ -1460,7 +1459,7 @@ module Azure::ARM::ServiceBus
#
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
#
def list_next_async(next_page_link, custom_headers = nil)
def list_by_subscription_next_async(next_page_link, custom_headers = nil)
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
@ -1495,7 +1494,7 @@ module Azure::ARM::ServiceBus
if status_code == 200
begin
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
result_mapper = NamespaceListResult.mapper()
result_mapper = Azure::ARM::ServiceBus::Models::NamespaceListResult.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)
@ -1582,7 +1581,7 @@ module Azure::ARM::ServiceBus
if status_code == 200
begin
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
result_mapper = NamespaceListResult.mapper()
result_mapper = Azure::ARM::ServiceBus::Models::NamespaceListResult.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)
@ -1669,7 +1668,7 @@ module Azure::ARM::ServiceBus
if status_code == 200
begin
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
result_mapper = SharedAccessAuthorizationRuleListResult.mapper()
result_mapper = Azure::ARM::ServiceBus::Models::SharedAccessAuthorizationRuleListResult.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)
@ -1692,12 +1691,12 @@ module Azure::ARM::ServiceBus
# @return [NamespaceListResult] which provide lazy access to pages of the
# response.
#
def list_as_lazy(custom_headers = nil)
response = list_async(custom_headers).value!
def list_by_subscription_as_lazy(custom_headers = nil)
response = list_by_subscription_async(custom_headers).value!
unless response.nil?
page = response.body
page.next_method = Proc.new do |next_page_link|
list_next_async(next_page_link, custom_headers)
list_by_subscription_next_async(next_page_link, custom_headers)
end
page
end

Просмотреть файл

@ -8,7 +8,6 @@ module Azure::ARM::ServiceBus
# Azure Service Bus client
#
class Operations
include Azure::ARM::ServiceBus::Models
include MsRestAzure
#
@ -90,7 +89,7 @@ module Azure::ARM::ServiceBus
if status_code == 200
begin
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
result_mapper = OperationListResult.mapper()
result_mapper = Azure::ARM::ServiceBus::Models::OperationListResult.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)
@ -177,7 +176,7 @@ module Azure::ARM::ServiceBus
if status_code == 200
begin
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
result_mapper = OperationListResult.mapper()
result_mapper = Azure::ARM::ServiceBus::Models::OperationListResult.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)

Просмотреть файл

@ -8,7 +8,6 @@ module Azure::ARM::ServiceBus
# Azure Service Bus client
#
class Queues
include Azure::ARM::ServiceBus::Models
include MsRestAzure
#
@ -31,10 +30,10 @@ module Azure::ARM::ServiceBus
# @param custom_headers [Hash{String => String}] A hash of custom headers that
# will be added to the HTTP request.
#
# @return [Array<Queue>] operation results.
# @return [Array<QueueResource>] operation results.
#
def list_by_namespace(resource_group_name, namespace_name, custom_headers = nil)
first_page = list_by_namespace_as_lazy(resource_group_name, namespace_name, custom_headers)
def list_all(resource_group_name, namespace_name, custom_headers = nil)
first_page = list_all_as_lazy(resource_group_name, namespace_name, custom_headers)
first_page.get_all_items
end
@ -49,8 +48,8 @@ module Azure::ARM::ServiceBus
#
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
#
def list_by_namespace_with_http_info(resource_group_name, namespace_name, custom_headers = nil)
list_by_namespace_async(resource_group_name, namespace_name, custom_headers).value!
def list_all_with_http_info(resource_group_name, namespace_name, custom_headers = nil)
list_all_async(resource_group_name, namespace_name, custom_headers).value!
end
#
@ -64,7 +63,7 @@ module Azure::ARM::ServiceBus
#
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
#
def list_by_namespace_async(resource_group_name, namespace_name, custom_headers = nil)
def list_all_async(resource_group_name, namespace_name, 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, '@client.api_version is nil' if @client.api_version.nil?
@ -103,7 +102,7 @@ module Azure::ARM::ServiceBus
if status_code == 200
begin
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
result_mapper = QueueListResult.mapper()
result_mapper = Azure::ARM::ServiceBus::Models::QueueListResult.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)
@ -123,12 +122,12 @@ module Azure::ARM::ServiceBus
# Azure subscription.
# @param namespace_name [String] The namespace name
# @param queue_name [String] The queue name.
# @param parameters [Queue] Parameters supplied to create or update a queue
# resource.
# @param parameters [QueueCreateOrUpdateParameters] Parameters supplied to
# create or update a queue resource.
# @param custom_headers [Hash{String => String}] A hash of custom headers that
# will be added to the HTTP request.
#
# @return [Queue] operation results.
# @return [QueueResource] operation results.
#
def create_or_update(resource_group_name, namespace_name, queue_name, parameters, custom_headers = nil)
response = create_or_update_async(resource_group_name, namespace_name, queue_name, parameters, custom_headers).value!
@ -142,8 +141,8 @@ module Azure::ARM::ServiceBus
# Azure subscription.
# @param namespace_name [String] The namespace name
# @param queue_name [String] The queue name.
# @param parameters [Queue] Parameters supplied to create or update a queue
# resource.
# @param parameters [QueueCreateOrUpdateParameters] Parameters supplied to
# create or update a queue resource.
# @param custom_headers [Hash{String => String}] A hash of custom headers that
# will be added to the HTTP request.
#
@ -160,8 +159,8 @@ module Azure::ARM::ServiceBus
# Azure subscription.
# @param namespace_name [String] The namespace name
# @param queue_name [String] The queue name.
# @param parameters [Queue] Parameters supplied to create or update a queue
# resource.
# @param parameters [QueueCreateOrUpdateParameters] Parameters supplied to
# create or update a queue resource.
# @param [Hash{String => String}] A hash of custom headers that will be added
# to the HTTP request.
#
@ -185,7 +184,7 @@ module Azure::ARM::ServiceBus
request_headers['Content-Type'] = 'application/json; charset=utf-8'
# Serialize Request
request_mapper = Queue.mapper()
request_mapper = Azure::ARM::ServiceBus::Models::QueueCreateOrUpdateParameters.mapper()
request_content = @client.serialize(request_mapper, parameters, 'parameters')
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
@ -217,7 +216,7 @@ module Azure::ARM::ServiceBus
if status_code == 200
begin
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
result_mapper = Queue.mapper()
result_mapper = Azure::ARM::ServiceBus::Models::QueueResource.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)
@ -327,7 +326,7 @@ module Azure::ARM::ServiceBus
# @param custom_headers [Hash{String => String}] A hash of custom headers that
# will be added to the HTTP request.
#
# @return [Queue] operation results.
# @return [QueueResource] operation results.
#
def get(resource_group_name, namespace_name, queue_name, custom_headers = nil)
response = get_async(resource_group_name, namespace_name, queue_name, custom_headers).value!
@ -402,7 +401,7 @@ module Azure::ARM::ServiceBus
if status_code == 200
begin
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
result_mapper = Queue.mapper()
result_mapper = Azure::ARM::ServiceBus::Models::QueueResource.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)
@ -425,7 +424,7 @@ module Azure::ARM::ServiceBus
# @param custom_headers [Hash{String => String}] A hash of custom headers that
# will be added to the HTTP request.
#
# @return [Array<SharedAccessAuthorizationRule>] operation results.
# @return [Array<SharedAccessAuthorizationRuleResource>] operation results.
#
def list_authorization_rules(resource_group_name, namespace_name, queue_name, custom_headers = nil)
first_page = list_authorization_rules_as_lazy(resource_group_name, namespace_name, queue_name, custom_headers)
@ -500,7 +499,7 @@ module Azure::ARM::ServiceBus
if status_code == 200
begin
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
result_mapper = SharedAccessAuthorizationRuleListResult.mapper()
result_mapper = Azure::ARM::ServiceBus::Models::SharedAccessAuthorizationRuleListResult.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)
@ -521,12 +520,12 @@ module Azure::ARM::ServiceBus
# @param namespace_name [String] The namespace name
# @param queue_name [String] The queue name.
# @param authorization_rule_name [String] The authorizationrule name.
# @param parameters [SharedAccessAuthorizationRule] The shared access
# authorization rule.
# @param parameters [SharedAccessAuthorizationRuleCreateOrUpdateParameters] The
# shared access authorization rule.
# @param custom_headers [Hash{String => String}] A hash of custom headers that
# will be added to the HTTP request.
#
# @return [SharedAccessAuthorizationRule] operation results.
# @return [SharedAccessAuthorizationRuleResource] operation results.
#
def create_or_update_authorization_rule(resource_group_name, namespace_name, queue_name, authorization_rule_name, parameters, custom_headers = nil)
response = create_or_update_authorization_rule_async(resource_group_name, namespace_name, queue_name, authorization_rule_name, parameters, custom_headers).value!
@ -541,8 +540,8 @@ module Azure::ARM::ServiceBus
# @param namespace_name [String] The namespace name
# @param queue_name [String] The queue name.
# @param authorization_rule_name [String] The authorizationrule name.
# @param parameters [SharedAccessAuthorizationRule] The shared access
# authorization rule.
# @param parameters [SharedAccessAuthorizationRuleCreateOrUpdateParameters] The
# shared access authorization rule.
# @param custom_headers [Hash{String => String}] A hash of custom headers that
# will be added to the HTTP request.
#
@ -560,8 +559,8 @@ module Azure::ARM::ServiceBus
# @param namespace_name [String] The namespace name
# @param queue_name [String] The queue name.
# @param authorization_rule_name [String] The authorizationrule name.
# @param parameters [SharedAccessAuthorizationRule] The shared access
# authorization rule.
# @param parameters [SharedAccessAuthorizationRuleCreateOrUpdateParameters] The
# shared access authorization rule.
# @param [Hash{String => String}] A hash of custom headers that will be added
# to the HTTP request.
#
@ -586,7 +585,7 @@ module Azure::ARM::ServiceBus
request_headers['Content-Type'] = 'application/json; charset=utf-8'
# Serialize Request
request_mapper = SharedAccessAuthorizationRule.mapper()
request_mapper = Azure::ARM::ServiceBus::Models::SharedAccessAuthorizationRuleCreateOrUpdateParameters.mapper()
request_content = @client.serialize(request_mapper, parameters, 'parameters')
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
@ -618,7 +617,7 @@ module Azure::ARM::ServiceBus
if status_code == 200
begin
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
result_mapper = SharedAccessAuthorizationRule.mapper()
result_mapper = Azure::ARM::ServiceBus::Models::SharedAccessAuthorizationRuleResource.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)
@ -733,7 +732,7 @@ module Azure::ARM::ServiceBus
# @param custom_headers [Hash{String => String}] A hash of custom headers that
# will be added to the HTTP request.
#
# @return [SharedAccessAuthorizationRule] operation results.
# @return [SharedAccessAuthorizationRuleResource] operation results.
#
def get_authorization_rule(resource_group_name, namespace_name, queue_name, authorization_rule_name, custom_headers = nil)
response = get_authorization_rule_async(resource_group_name, namespace_name, queue_name, authorization_rule_name, custom_headers).value!
@ -811,7 +810,7 @@ module Azure::ARM::ServiceBus
if status_code == 200
begin
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
result_mapper = SharedAccessAuthorizationRule.mapper()
result_mapper = Azure::ARM::ServiceBus::Models::SharedAccessAuthorizationRuleResource.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)
@ -913,7 +912,7 @@ module Azure::ARM::ServiceBus
if status_code == 200
begin
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
result_mapper = ResourceListKeys.mapper()
result_mapper = Azure::ARM::ServiceBus::Models::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)
@ -999,7 +998,7 @@ module Azure::ARM::ServiceBus
request_headers['Content-Type'] = 'application/json; charset=utf-8'
# Serialize Request
request_mapper = RegenerateKeysParameters.mapper()
request_mapper = Azure::ARM::ServiceBus::Models::RegenerateKeysParameters.mapper()
request_content = @client.serialize(request_mapper, parameters, 'parameters')
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
@ -1031,7 +1030,7 @@ module Azure::ARM::ServiceBus
if status_code == 200
begin
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
result_mapper = ResourceListKeys.mapper()
result_mapper = Azure::ARM::ServiceBus::Models::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)
@ -1054,8 +1053,8 @@ module Azure::ARM::ServiceBus
#
# @return [QueueListResult] operation results.
#
def list_by_namespace_next(next_page_link, custom_headers = nil)
response = list_by_namespace_next_async(next_page_link, custom_headers).value!
def list_all_next(next_page_link, custom_headers = nil)
response = list_all_next_async(next_page_link, custom_headers).value!
response.body unless response.nil?
end
@ -1069,8 +1068,8 @@ module Azure::ARM::ServiceBus
#
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
#
def list_by_namespace_next_with_http_info(next_page_link, custom_headers = nil)
list_by_namespace_next_async(next_page_link, custom_headers).value!
def list_all_next_with_http_info(next_page_link, custom_headers = nil)
list_all_next_async(next_page_link, custom_headers).value!
end
#
@ -1083,7 +1082,7 @@ module Azure::ARM::ServiceBus
#
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
#
def list_by_namespace_next_async(next_page_link, custom_headers = nil)
def list_all_next_async(next_page_link, custom_headers = nil)
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
@ -1118,7 +1117,7 @@ module Azure::ARM::ServiceBus
if status_code == 200
begin
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
result_mapper = QueueListResult.mapper()
result_mapper = Azure::ARM::ServiceBus::Models::QueueListResult.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)
@ -1205,7 +1204,7 @@ module Azure::ARM::ServiceBus
if status_code == 200
begin
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
result_mapper = SharedAccessAuthorizationRuleListResult.mapper()
result_mapper = Azure::ARM::ServiceBus::Models::SharedAccessAuthorizationRuleListResult.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)
@ -1229,12 +1228,12 @@ module Azure::ARM::ServiceBus
#
# @return [QueueListResult] which provide lazy access to pages of the response.
#
def list_by_namespace_as_lazy(resource_group_name, namespace_name, custom_headers = nil)
response = list_by_namespace_async(resource_group_name, namespace_name, custom_headers).value!
def list_all_as_lazy(resource_group_name, namespace_name, custom_headers = nil)
response = list_all_async(resource_group_name, namespace_name, custom_headers).value!
unless response.nil?
page = response.body
page.next_method = Proc.new do |next_page_link|
list_by_namespace_next_async(next_page_link, custom_headers)
list_all_next_async(next_page_link, custom_headers)
end
page
end

Просмотреть файл

@ -8,7 +8,6 @@ module Azure::ARM::ServiceBus
# Azure Service Bus client
#
class Subscriptions
include Azure::ARM::ServiceBus::Models
include MsRestAzure
#
@ -32,10 +31,10 @@ module Azure::ARM::ServiceBus
# @param custom_headers [Hash{String => String}] A hash of custom headers that
# will be added to the HTTP request.
#
# @return [Array<Subscription>] operation results.
# @return [Array<SubscriptionResource>] operation results.
#
def list_by_topic(resource_group_name, namespace_name, topic_name, custom_headers = nil)
first_page = list_by_topic_as_lazy(resource_group_name, namespace_name, topic_name, custom_headers)
def list_all(resource_group_name, namespace_name, topic_name, custom_headers = nil)
first_page = list_all_as_lazy(resource_group_name, namespace_name, topic_name, custom_headers)
first_page.get_all_items
end
@ -51,8 +50,8 @@ module Azure::ARM::ServiceBus
#
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
#
def list_by_topic_with_http_info(resource_group_name, namespace_name, topic_name, custom_headers = nil)
list_by_topic_async(resource_group_name, namespace_name, topic_name, custom_headers).value!
def list_all_with_http_info(resource_group_name, namespace_name, topic_name, custom_headers = nil)
list_all_async(resource_group_name, namespace_name, topic_name, custom_headers).value!
end
#
@ -67,7 +66,7 @@ module Azure::ARM::ServiceBus
#
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
#
def list_by_topic_async(resource_group_name, namespace_name, topic_name, custom_headers = nil)
def list_all_async(resource_group_name, namespace_name, topic_name, 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, 'topic_name is nil' if topic_name.nil?
@ -107,7 +106,7 @@ module Azure::ARM::ServiceBus
if status_code == 200
begin
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
result_mapper = SubscriptionListResult.mapper()
result_mapper = Azure::ARM::ServiceBus::Models::SubscriptionListResult.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)
@ -128,12 +127,12 @@ module Azure::ARM::ServiceBus
# @param namespace_name [String] The namespace name
# @param topic_name [String] The topic name.
# @param subscription_name [String] The subscription name.
# @param parameters [Subscription] Parameters supplied to create a subscription
# resource.
# @param parameters [SubscriptionCreateOrUpdateParameters] Parameters supplied
# to create a subscription resource.
# @param custom_headers [Hash{String => String}] A hash of custom headers that
# will be added to the HTTP request.
#
# @return [Subscription] operation results.
# @return [SubscriptionResource] operation results.
#
def create_or_update(resource_group_name, namespace_name, topic_name, subscription_name, parameters, custom_headers = nil)
response = create_or_update_async(resource_group_name, namespace_name, topic_name, subscription_name, parameters, custom_headers).value!
@ -148,8 +147,8 @@ module Azure::ARM::ServiceBus
# @param namespace_name [String] The namespace name
# @param topic_name [String] The topic name.
# @param subscription_name [String] The subscription name.
# @param parameters [Subscription] Parameters supplied to create a subscription
# resource.
# @param parameters [SubscriptionCreateOrUpdateParameters] Parameters supplied
# to create a subscription resource.
# @param custom_headers [Hash{String => String}] A hash of custom headers that
# will be added to the HTTP request.
#
@ -167,8 +166,8 @@ module Azure::ARM::ServiceBus
# @param namespace_name [String] The namespace name
# @param topic_name [String] The topic name.
# @param subscription_name [String] The subscription name.
# @param parameters [Subscription] Parameters supplied to create a subscription
# resource.
# @param parameters [SubscriptionCreateOrUpdateParameters] Parameters supplied
# to create a subscription resource.
# @param [Hash{String => String}] A hash of custom headers that will be added
# to the HTTP request.
#
@ -193,7 +192,7 @@ module Azure::ARM::ServiceBus
request_headers['Content-Type'] = 'application/json; charset=utf-8'
# Serialize Request
request_mapper = Subscription.mapper()
request_mapper = Azure::ARM::ServiceBus::Models::SubscriptionCreateOrUpdateParameters.mapper()
request_content = @client.serialize(request_mapper, parameters, 'parameters')
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
@ -225,7 +224,7 @@ module Azure::ARM::ServiceBus
if status_code == 200
begin
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
result_mapper = Subscription.mapper()
result_mapper = Azure::ARM::ServiceBus::Models::SubscriptionResource.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)
@ -340,7 +339,7 @@ module Azure::ARM::ServiceBus
# @param custom_headers [Hash{String => String}] A hash of custom headers that
# will be added to the HTTP request.
#
# @return [Subscription] operation results.
# @return [SubscriptionResource] operation results.
#
def get(resource_group_name, namespace_name, topic_name, subscription_name, custom_headers = nil)
response = get_async(resource_group_name, namespace_name, topic_name, subscription_name, custom_headers).value!
@ -418,7 +417,7 @@ module Azure::ARM::ServiceBus
if status_code == 200
begin
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
result_mapper = Subscription.mapper()
result_mapper = Azure::ARM::ServiceBus::Models::SubscriptionResource.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)
@ -441,8 +440,8 @@ module Azure::ARM::ServiceBus
#
# @return [SubscriptionListResult] operation results.
#
def list_by_topic_next(next_page_link, custom_headers = nil)
response = list_by_topic_next_async(next_page_link, custom_headers).value!
def list_all_next(next_page_link, custom_headers = nil)
response = list_all_next_async(next_page_link, custom_headers).value!
response.body unless response.nil?
end
@ -456,8 +455,8 @@ module Azure::ARM::ServiceBus
#
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
#
def list_by_topic_next_with_http_info(next_page_link, custom_headers = nil)
list_by_topic_next_async(next_page_link, custom_headers).value!
def list_all_next_with_http_info(next_page_link, custom_headers = nil)
list_all_next_async(next_page_link, custom_headers).value!
end
#
@ -470,7 +469,7 @@ module Azure::ARM::ServiceBus
#
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
#
def list_by_topic_next_async(next_page_link, custom_headers = nil)
def list_all_next_async(next_page_link, custom_headers = nil)
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
@ -505,7 +504,7 @@ module Azure::ARM::ServiceBus
if status_code == 200
begin
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
result_mapper = SubscriptionListResult.mapper()
result_mapper = Azure::ARM::ServiceBus::Models::SubscriptionListResult.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)
@ -531,12 +530,12 @@ module Azure::ARM::ServiceBus
# @return [SubscriptionListResult] which provide lazy access to pages of the
# response.
#
def list_by_topic_as_lazy(resource_group_name, namespace_name, topic_name, custom_headers = nil)
response = list_by_topic_async(resource_group_name, namespace_name, topic_name, custom_headers).value!
def list_all_as_lazy(resource_group_name, namespace_name, topic_name, custom_headers = nil)
response = list_all_async(resource_group_name, namespace_name, topic_name, custom_headers).value!
unless response.nil?
page = response.body
page.next_method = Proc.new do |next_page_link|
list_by_topic_next_async(next_page_link, custom_headers)
list_all_next_async(next_page_link, custom_headers)
end
page
end

Просмотреть файл

@ -8,7 +8,6 @@ module Azure::ARM::ServiceBus
# Azure Service Bus client
#
class Topics
include Azure::ARM::ServiceBus::Models
include MsRestAzure
#
@ -31,10 +30,10 @@ module Azure::ARM::ServiceBus
# @param custom_headers [Hash{String => String}] A hash of custom headers that
# will be added to the HTTP request.
#
# @return [Array<Topic>] operation results.
# @return [Array<TopicResource>] operation results.
#
def list_by_namespace(resource_group_name, namespace_name, custom_headers = nil)
first_page = list_by_namespace_as_lazy(resource_group_name, namespace_name, custom_headers)
def list_all(resource_group_name, namespace_name, custom_headers = nil)
first_page = list_all_as_lazy(resource_group_name, namespace_name, custom_headers)
first_page.get_all_items
end
@ -49,8 +48,8 @@ module Azure::ARM::ServiceBus
#
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
#
def list_by_namespace_with_http_info(resource_group_name, namespace_name, custom_headers = nil)
list_by_namespace_async(resource_group_name, namespace_name, custom_headers).value!
def list_all_with_http_info(resource_group_name, namespace_name, custom_headers = nil)
list_all_async(resource_group_name, namespace_name, custom_headers).value!
end
#
@ -64,7 +63,7 @@ module Azure::ARM::ServiceBus
#
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
#
def list_by_namespace_async(resource_group_name, namespace_name, custom_headers = nil)
def list_all_async(resource_group_name, namespace_name, 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, '@client.api_version is nil' if @client.api_version.nil?
@ -103,7 +102,7 @@ module Azure::ARM::ServiceBus
if status_code == 200
begin
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
result_mapper = TopicListResult.mapper()
result_mapper = Azure::ARM::ServiceBus::Models::TopicListResult.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)
@ -123,11 +122,12 @@ module Azure::ARM::ServiceBus
# Azure subscription.
# @param namespace_name [String] The namespace name
# @param topic_name [String] The topic name.
# @param parameters [Topic] Parameters supplied to create a topic resource.
# @param parameters [TopicCreateOrUpdateParameters] Parameters supplied to
# create a topic resource.
# @param custom_headers [Hash{String => String}] A hash of custom headers that
# will be added to the HTTP request.
#
# @return [Topic] operation results.
# @return [TopicResource] operation results.
#
def create_or_update(resource_group_name, namespace_name, topic_name, parameters, custom_headers = nil)
response = create_or_update_async(resource_group_name, namespace_name, topic_name, parameters, custom_headers).value!
@ -141,7 +141,8 @@ module Azure::ARM::ServiceBus
# Azure subscription.
# @param namespace_name [String] The namespace name
# @param topic_name [String] The topic name.
# @param parameters [Topic] Parameters supplied to create a topic resource.
# @param parameters [TopicCreateOrUpdateParameters] Parameters supplied to
# create a topic resource.
# @param custom_headers [Hash{String => String}] A hash of custom headers that
# will be added to the HTTP request.
#
@ -158,7 +159,8 @@ module Azure::ARM::ServiceBus
# Azure subscription.
# @param namespace_name [String] The namespace name
# @param topic_name [String] The topic name.
# @param parameters [Topic] Parameters supplied to create a topic resource.
# @param parameters [TopicCreateOrUpdateParameters] Parameters supplied to
# create a topic resource.
# @param [Hash{String => String}] A hash of custom headers that will be added
# to the HTTP request.
#
@ -182,7 +184,7 @@ module Azure::ARM::ServiceBus
request_headers['Content-Type'] = 'application/json; charset=utf-8'
# Serialize Request
request_mapper = Topic.mapper()
request_mapper = Azure::ARM::ServiceBus::Models::TopicCreateOrUpdateParameters.mapper()
request_content = @client.serialize(request_mapper, parameters, 'parameters')
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
@ -214,7 +216,7 @@ module Azure::ARM::ServiceBus
if status_code == 200
begin
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
result_mapper = Topic.mapper()
result_mapper = Azure::ARM::ServiceBus::Models::TopicResource.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)
@ -324,7 +326,7 @@ module Azure::ARM::ServiceBus
# @param custom_headers [Hash{String => String}] A hash of custom headers that
# will be added to the HTTP request.
#
# @return [Topic] operation results.
# @return [TopicResource] operation results.
#
def get(resource_group_name, namespace_name, topic_name, custom_headers = nil)
response = get_async(resource_group_name, namespace_name, topic_name, custom_headers).value!
@ -399,7 +401,7 @@ module Azure::ARM::ServiceBus
if status_code == 200
begin
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
result_mapper = Topic.mapper()
result_mapper = Azure::ARM::ServiceBus::Models::TopicResource.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)
@ -422,7 +424,7 @@ module Azure::ARM::ServiceBus
# @param custom_headers [Hash{String => String}] A hash of custom headers that
# will be added to the HTTP request.
#
# @return [Array<SharedAccessAuthorizationRule>] operation results.
# @return [Array<SharedAccessAuthorizationRuleResource>] operation results.
#
def list_authorization_rules(resource_group_name, namespace_name, topic_name, custom_headers = nil)
first_page = list_authorization_rules_as_lazy(resource_group_name, namespace_name, topic_name, custom_headers)
@ -497,7 +499,7 @@ module Azure::ARM::ServiceBus
if status_code == 200
begin
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
result_mapper = SharedAccessAuthorizationRuleListResult.mapper()
result_mapper = Azure::ARM::ServiceBus::Models::SharedAccessAuthorizationRuleListResult.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)
@ -518,12 +520,12 @@ module Azure::ARM::ServiceBus
# @param namespace_name [String] The namespace name
# @param topic_name [String] The topic name.
# @param authorization_rule_name [String] The authorizationrule name.
# @param parameters [SharedAccessAuthorizationRule] The shared access
# authorization rule.
# @param parameters [SharedAccessAuthorizationRuleCreateOrUpdateParameters] The
# shared access authorization rule.
# @param custom_headers [Hash{String => String}] A hash of custom headers that
# will be added to the HTTP request.
#
# @return [SharedAccessAuthorizationRule] operation results.
# @return [SharedAccessAuthorizationRuleResource] operation results.
#
def create_or_update_authorization_rule(resource_group_name, namespace_name, topic_name, authorization_rule_name, parameters, custom_headers = nil)
response = create_or_update_authorization_rule_async(resource_group_name, namespace_name, topic_name, authorization_rule_name, parameters, custom_headers).value!
@ -538,8 +540,8 @@ module Azure::ARM::ServiceBus
# @param namespace_name [String] The namespace name
# @param topic_name [String] The topic name.
# @param authorization_rule_name [String] The authorizationrule name.
# @param parameters [SharedAccessAuthorizationRule] The shared access
# authorization rule.
# @param parameters [SharedAccessAuthorizationRuleCreateOrUpdateParameters] The
# shared access authorization rule.
# @param custom_headers [Hash{String => String}] A hash of custom headers that
# will be added to the HTTP request.
#
@ -557,8 +559,8 @@ module Azure::ARM::ServiceBus
# @param namespace_name [String] The namespace name
# @param topic_name [String] The topic name.
# @param authorization_rule_name [String] The authorizationrule name.
# @param parameters [SharedAccessAuthorizationRule] The shared access
# authorization rule.
# @param parameters [SharedAccessAuthorizationRuleCreateOrUpdateParameters] The
# shared access authorization rule.
# @param [Hash{String => String}] A hash of custom headers that will be added
# to the HTTP request.
#
@ -583,7 +585,7 @@ module Azure::ARM::ServiceBus
request_headers['Content-Type'] = 'application/json; charset=utf-8'
# Serialize Request
request_mapper = SharedAccessAuthorizationRule.mapper()
request_mapper = Azure::ARM::ServiceBus::Models::SharedAccessAuthorizationRuleCreateOrUpdateParameters.mapper()
request_content = @client.serialize(request_mapper, parameters, 'parameters')
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
@ -615,7 +617,7 @@ module Azure::ARM::ServiceBus
if status_code == 200
begin
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
result_mapper = SharedAccessAuthorizationRule.mapper()
result_mapper = Azure::ARM::ServiceBus::Models::SharedAccessAuthorizationRuleResource.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)
@ -639,7 +641,7 @@ module Azure::ARM::ServiceBus
# @param custom_headers [Hash{String => String}] A hash of custom headers that
# will be added to the HTTP request.
#
# @return [SharedAccessAuthorizationRule] operation results.
# @return [SharedAccessAuthorizationRuleResource] operation results.
#
def get_authorization_rule(resource_group_name, namespace_name, topic_name, authorization_rule_name, custom_headers = nil)
response = get_authorization_rule_async(resource_group_name, namespace_name, topic_name, authorization_rule_name, custom_headers).value!
@ -717,7 +719,7 @@ module Azure::ARM::ServiceBus
if status_code == 200
begin
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
result_mapper = SharedAccessAuthorizationRule.mapper()
result_mapper = Azure::ARM::ServiceBus::Models::SharedAccessAuthorizationRuleResource.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)
@ -910,7 +912,7 @@ module Azure::ARM::ServiceBus
if status_code == 200
begin
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
result_mapper = ResourceListKeys.mapper()
result_mapper = Azure::ARM::ServiceBus::Models::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)
@ -996,7 +998,7 @@ module Azure::ARM::ServiceBus
request_headers['Content-Type'] = 'application/json; charset=utf-8'
# Serialize Request
request_mapper = RegenerateKeysParameters.mapper()
request_mapper = Azure::ARM::ServiceBus::Models::RegenerateKeysParameters.mapper()
request_content = @client.serialize(request_mapper, parameters, 'parameters')
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
@ -1028,7 +1030,7 @@ module Azure::ARM::ServiceBus
if status_code == 200
begin
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
result_mapper = ResourceListKeys.mapper()
result_mapper = Azure::ARM::ServiceBus::Models::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)
@ -1051,8 +1053,8 @@ module Azure::ARM::ServiceBus
#
# @return [TopicListResult] operation results.
#
def list_by_namespace_next(next_page_link, custom_headers = nil)
response = list_by_namespace_next_async(next_page_link, custom_headers).value!
def list_all_next(next_page_link, custom_headers = nil)
response = list_all_next_async(next_page_link, custom_headers).value!
response.body unless response.nil?
end
@ -1066,8 +1068,8 @@ module Azure::ARM::ServiceBus
#
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
#
def list_by_namespace_next_with_http_info(next_page_link, custom_headers = nil)
list_by_namespace_next_async(next_page_link, custom_headers).value!
def list_all_next_with_http_info(next_page_link, custom_headers = nil)
list_all_next_async(next_page_link, custom_headers).value!
end
#
@ -1080,7 +1082,7 @@ module Azure::ARM::ServiceBus
#
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
#
def list_by_namespace_next_async(next_page_link, custom_headers = nil)
def list_all_next_async(next_page_link, custom_headers = nil)
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
@ -1115,7 +1117,7 @@ module Azure::ARM::ServiceBus
if status_code == 200
begin
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
result_mapper = TopicListResult.mapper()
result_mapper = Azure::ARM::ServiceBus::Models::TopicListResult.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)
@ -1202,7 +1204,7 @@ module Azure::ARM::ServiceBus
if status_code == 200
begin
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
result_mapper = SharedAccessAuthorizationRuleListResult.mapper()
result_mapper = Azure::ARM::ServiceBus::Models::SharedAccessAuthorizationRuleListResult.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)
@ -1226,12 +1228,12 @@ module Azure::ARM::ServiceBus
#
# @return [TopicListResult] which provide lazy access to pages of the response.
#
def list_by_namespace_as_lazy(resource_group_name, namespace_name, custom_headers = nil)
response = list_by_namespace_async(resource_group_name, namespace_name, custom_headers).value!
def list_all_as_lazy(resource_group_name, namespace_name, custom_headers = nil)
response = list_all_async(resource_group_name, namespace_name, custom_headers).value!
unless response.nil?
page = response.body
page.next_method = Proc.new do |next_page_link|
list_by_namespace_next_async(next_page_link, custom_headers)
list_all_next_async(next_page_link, custom_headers)
end
page
end