Class: MicrosoftGraph::Models::CrossTenantAccessPolicy

Inherits:
PolicyBase show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/cross_tenant_access_policy.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from PolicyBase

#description, #description=, #display_name, #display_name=

Methods inherited from DirectoryObject

#deleted_date_time, #deleted_date_time=

Methods inherited from Entity

#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=

Constructor Details

#initializeObject

Instantiates a new crossTenantAccessPolicy and sets the default values.



37
38
39
40
# File 'lib/models/cross_tenant_access_policy.rb', line 37

def initialize()
    super
    @odata_type = "#microsoft.graph.crossTenantAccessPolicy"
end

Class Method Details

.create_from_discriminator_value(parse_node) ⇒ Object

Creates a new instance of the appropriate class based on discriminator value

Parameters:

  • parse_node

    The parse node to use to read the discriminator value and create the object

Returns:

  • a cross_tenant_access_policy

Raises:

  • (StandardError)


46
47
48
49
# File 'lib/models/cross_tenant_access_policy.rb', line 46

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return CrossTenantAccessPolicy.new
end

Instance Method Details

#allowed_cloud_endpointsObject

Gets the allowedCloudEndpoints property value. Used to specify which Microsoft clouds an organization would like to collaborate with. By default, this value is empty. Supported values for this field are: microsoftonline.com, microsoftonline.us, and partner.microsoftonline.cn.

Returns:

  • a string



22
23
24
# File 'lib/models/cross_tenant_access_policy.rb', line 22

def allowed_cloud_endpoints
    return @allowed_cloud_endpoints
end

#allowed_cloud_endpoints=(value) ⇒ Object

Sets the allowedCloudEndpoints property value. Used to specify which Microsoft clouds an organization would like to collaborate with. By default, this value is empty. Supported values for this field are: microsoftonline.com, microsoftonline.us, and partner.microsoftonline.cn.

Parameters:

  • value

    Value to set for the allowedCloudEndpoints property.

Returns:

  • a void



30
31
32
# File 'lib/models/cross_tenant_access_policy.rb', line 30

def allowed_cloud_endpoints=(value)
    @allowed_cloud_endpoints = value
end

#defaultObject

Gets the default property value. Defines the default configuration for how your organization interacts with external Azure Active Directory organizations.

Returns:

  • a cross_tenant_access_policy_configuration_default



54
55
56
# File 'lib/models/cross_tenant_access_policy.rb', line 54

def default
    return @default
end

#default=(value) ⇒ Object

Sets the default property value. Defines the default configuration for how your organization interacts with external Azure Active Directory organizations.

Parameters:

  • value

    Value to set for the default property.

Returns:

  • a void



62
63
64
# File 'lib/models/cross_tenant_access_policy.rb', line 62

def default=(value)
    @default = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



69
70
71
72
73
74
75
# File 'lib/models/cross_tenant_access_policy.rb', line 69

def get_field_deserializers()
    return super.merge({
        "allowedCloudEndpoints" => lambda {|n| @allowed_cloud_endpoints = n.get_collection_of_primitive_values(String) },
        "default" => lambda {|n| @default = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::CrossTenantAccessPolicyConfigurationDefault.create_from_discriminator_value(pn) }) },
        "partners" => lambda {|n| @partners = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::CrossTenantAccessPolicyConfigurationPartner.create_from_discriminator_value(pn) }) },
    })
end

#partnersObject

Gets the partners property value. Defines partner-specific configurations for external Azure Active Directory organizations.

Returns:

  • a cross_tenant_access_policy_configuration_partner



80
81
82
# File 'lib/models/cross_tenant_access_policy.rb', line 80

def partners
    return @partners
end

#partners=(value) ⇒ Object

Sets the partners property value. Defines partner-specific configurations for external Azure Active Directory organizations.

Parameters:

  • value

    Value to set for the partners property.

Returns:

  • a void



88
89
90
# File 'lib/models/cross_tenant_access_policy.rb', line 88

def partners=(value)
    @partners = value
end

#serialize(writer) ⇒ Object

Serializes information the current object

Parameters:

  • writer

    Serialization writer to use to serialize this model

Returns:

  • a void

Raises:

  • (StandardError)


96
97
98
99
100
101
102
# File 'lib/models/cross_tenant_access_policy.rb', line 96

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_collection_of_primitive_values("allowedCloudEndpoints", @allowed_cloud_endpoints)
    writer.write_object_value("default", @default)
    writer.write_collection_of_object_values("partners", @partners)
end