Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Generated from 40e8139248e09a637e8854e7866ab1c372ca0bfb
  • Loading branch information
SwaggerToSDK Automation committed Sep 11, 2017
commit f3525ec7c6562007c5cc3ff209e372b862731d39
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@ module Azure::ARM::Policy
autoload :PolicyClient, 'generated/azure_mgmt_policy/policy_client.rb'

module Models
autoload :PolicySku, 'generated/azure_mgmt_policy/models/policy_sku.rb'
autoload :PolicyAssignment, 'generated/azure_mgmt_policy/models/policy_assignment.rb'
autoload :PolicyDefinition, 'generated/azure_mgmt_policy/models/policy_definition.rb'
autoload :PolicyAssignmentListResult, 'generated/azure_mgmt_policy/models/policy_assignment_list_result.rb'
autoload :PolicyDefinitionListResult, 'generated/azure_mgmt_policy/models/policy_definition_list_result.rb'
autoload :PolicyAssignmentListResult, 'generated/azure_mgmt_policy/models/policy_assignment_list_result.rb'
autoload :PolicyDefinition, 'generated/azure_mgmt_policy/models/policy_definition.rb'
autoload :PolicyType, 'generated/azure_mgmt_policy/models/policy_type.rb'
autoload :PolicyMode, 'generated/azure_mgmt_policy/models/policy_mode.rb'
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
module Azure::ARM::Policy
module Models
#
# The policy definition.
# The policy assignment.
#
class PolicyAssignment

Expand All @@ -22,9 +22,15 @@ class PolicyAssignment
# @return [String] The scope for the policy assignment.
attr_accessor :scope

# @return [Array<String>] The policy's excluded scopes.
attr_accessor :not_scopes

# @return Required if a parameter is used in policy rule.
attr_accessor :parameters

# @return The policy assignment metadata.
attr_accessor :metadata

# @return [String] This message will be part of response in case of
# policy violation.
attr_accessor :description
Expand All @@ -38,6 +44,9 @@ class PolicyAssignment
# @return [String] The name of the policy assignment.
attr_accessor :name

# @return [PolicySku] The policy sku.
attr_accessor :sku


#
# Mapper for PolicyAssignment class as Ruby Hash.
Expand Down Expand Up @@ -72,13 +81,34 @@ def self.mapper()
name: 'String'
}
},
not_scopes: {
required: false,
serialized_name: 'properties.notScopes',
type: {
name: 'Sequence',
element: {
required: false,
serialized_name: 'StringElementType',
type: {
name: 'String'
}
}
}
},
parameters: {
required: false,
serialized_name: 'properties.parameters',
type: {
name: 'Object'
}
},
metadata: {
required: false,
serialized_name: 'properties.metadata',
type: {
name: 'Object'
}
},
description: {
required: false,
serialized_name: 'properties.description',
Expand All @@ -88,6 +118,7 @@ def self.mapper()
},
id: {
required: false,
read_only: true,
serialized_name: 'id',
type: {
name: 'String'
Expand All @@ -106,6 +137,14 @@ def self.mapper()
type: {
name: 'String'
}
},
sku: {
required: false,
serialized_name: 'sku',
type: {
name: 'Composite',
class_name: 'PolicySku'
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ class PolicyDefinition
# 'NotSpecified', 'BuiltIn', 'Custom'
attr_accessor :policy_type

# @return [PolicyMode] The policy definition mode. Possible values are
# NotSpecified, Indexed, and All. Possible values include:
# 'NotSpecified', 'Indexed', 'All'
attr_accessor :mode

# @return [String] The display name of the policy definition.
attr_accessor :display_name

Expand All @@ -27,6 +32,9 @@ class PolicyDefinition
# @return The policy rule.
attr_accessor :policy_rule

# @return The policy definition metadata.
attr_accessor :metadata

# @return Required if a parameter is used in policy rule.
attr_accessor :parameters

Expand Down Expand Up @@ -58,6 +66,13 @@ def self.mapper()
name: 'String'
}
},
mode: {
required: false,
serialized_name: 'properties.mode',
type: {
name: 'String'
}
},
display_name: {
required: false,
serialized_name: 'properties.displayName',
Expand All @@ -79,6 +94,13 @@ def self.mapper()
name: 'Object'
}
},
metadata: {
required: false,
serialized_name: 'properties.metadata',
type: {
name: 'Object'
}
},
parameters: {
required: false,
serialized_name: 'properties.parameters',
Expand All @@ -88,6 +110,7 @@ def self.mapper()
},
id: {
required: false,
read_only: true,
serialized_name: 'id',
type: {
name: 'String'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# encoding: utf-8
# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.

module Azure::ARM::Policy
module Models
#
# Defines values for PolicyMode
#
module PolicyMode
NotSpecified = "NotSpecified"
Indexed = "Indexed"
All = "All"
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# encoding: utf-8
# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.

module Azure::ARM::Policy
module Models
#
# The policy sku.
#
class PolicySku

include MsRestAzure

include MsRest::JSONable
# @return [String] The name of the policy sku. Possible values are A0 and
# A1.
attr_accessor :name

# @return [String] The policy sku tier. Possible values are Free and
# Standard.
attr_accessor :tier


#
# Mapper for PolicySku class as Ruby Hash.
# This will be used for serialization/deserialization.
#
def self.mapper()
{
required: false,
serialized_name: 'PolicySku',
type: {
name: 'Composite',
class_name: 'PolicySku',
model_properties: {
name: {
required: true,
serialized_name: 'name',
type: {
name: 'String'
}
},
tier: {
required: false,
serialized_name: 'tier',
type: {
name: 'String'
}
}
}
}
}
end
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def delete_async(scope, policy_assignment_name, custom_headers = nil)
# Set Headers
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
path_template = '{scope}/providers/Microsoft.Authorization/policyassignments/{policyAssignmentName}'
path_template = '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'

request_url = @base_url || @client.base_url

Expand All @@ -93,7 +93,7 @@ def delete_async(scope, policy_assignment_name, custom_headers = nil)
http_response = result.response
status_code = http_response.status
response_content = http_response.body
unless status_code == 200
unless status_code == 200 || status_code == 204
error_model = JSON.load(response_content)
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
end
Expand Down Expand Up @@ -190,7 +190,7 @@ def create_async(scope, policy_assignment_name, parameters, custom_headers = nil
request_content = @client.serialize(request_mapper, parameters)
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

path_template = '{scope}/providers/Microsoft.Authorization/policyassignments/{policyAssignmentName}'
path_template = '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'

request_url = @base_url || @client.base_url

Expand Down Expand Up @@ -285,7 +285,7 @@ def get_async(scope, policy_assignment_name, custom_headers = nil)
# Set Headers
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
path_template = '{scope}/providers/Microsoft.Authorization/policyassignments/{policyAssignmentName}'
path_template = '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'

request_url = @base_url || @client.base_url

Expand Down Expand Up @@ -495,7 +495,7 @@ def list_for_resource_async(resource_group_name, resource_provider_namespace, pa
# Set Headers
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/policyassignments'
path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/policyAssignments'

request_url = @base_url || @client.base_url

Expand Down Expand Up @@ -582,7 +582,7 @@ def list_async(filter = nil, custom_headers = nil)
# Set Headers
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyassignments'
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyAssignments'

request_url = @base_url || @client.base_url

Expand Down
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Loading