Class: OCI::GoldenGate::Models::GroupToRolesMappingDetails

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/golden_gate/models/group_to_roles_mapping_details.rb

Overview

Defines the IDP Groups to GoldenGate roles mapping. This field is used only for IAM deployment and does not have any impact on non-IAM deployments. For IAM deployment, when user does not specify this mapping, then it has null value and default mapping is used. User belonging to each group can only perform the actions according to the role the respective group is mapped to.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ GroupToRolesMappingDetails

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):



75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/oci/golden_gate/models/group_to_roles_mapping_details.rb', line 75

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  self.security_group_id = attributes[:'securityGroupId'] if attributes[:'securityGroupId']

  raise 'You cannot provide both :securityGroupId and :security_group_id' if attributes.key?(:'securityGroupId') && attributes.key?(:'security_group_id')

  self.security_group_id = attributes[:'security_group_id'] if attributes[:'security_group_id']

  self.administrator_group_id = attributes[:'administratorGroupId'] if attributes[:'administratorGroupId']

  raise 'You cannot provide both :administratorGroupId and :administrator_group_id' if attributes.key?(:'administratorGroupId') && attributes.key?(:'administrator_group_id')

  self.administrator_group_id = attributes[:'administrator_group_id'] if attributes[:'administrator_group_id']

  self.operator_group_id = attributes[:'operatorGroupId'] if attributes[:'operatorGroupId']

  raise 'You cannot provide both :operatorGroupId and :operator_group_id' if attributes.key?(:'operatorGroupId') && attributes.key?(:'operator_group_id')

  self.operator_group_id = attributes[:'operator_group_id'] if attributes[:'operator_group_id']

  self.user_group_id = attributes[:'userGroupId'] if attributes[:'userGroupId']

  raise 'You cannot provide both :userGroupId and :user_group_id' if attributes.key?(:'userGroupId') && attributes.key?(:'user_group_id')

  self.user_group_id = attributes[:'user_group_id'] if attributes[:'user_group_id']
end

Instance Attribute Details

#administrator_group_idString

The OCID of the IDP group which will be mapped to goldengate role administratorGroup. It grants full access to the user, including the ability to alter general, non-security related operational parameters and profiles of the server.

Returns:

  • (String)


25
26
27
# File 'lib/oci/golden_gate/models/group_to_roles_mapping_details.rb', line 25

def administrator_group_id
  @administrator_group_id
end

#operator_group_idString

The OCID of the IDP group which will be mapped to goldengate role operatorGroup. It allows users to perform only operational actions, like starting and stopping resources. Operators cannot alter the operational parameters or profiles of the MA server.

Returns:

  • (String)


32
33
34
# File 'lib/oci/golden_gate/models/group_to_roles_mapping_details.rb', line 32

def operator_group_id
  @operator_group_id
end

#security_group_idString

[Required] The OCID of the IDP group which will be mapped to goldengate role securityGroup. It grants administration of security related objects and invoke security related service requests. This role has full privileges.

Returns:

  • (String)


18
19
20
# File 'lib/oci/golden_gate/models/group_to_roles_mapping_details.rb', line 18

def security_group_id
  @security_group_id
end

#user_group_idString

The OCID of the IDP group which will be mapped to goldengate role userGroup. It allows information-only service requests, which do not alter or affect the operation of either the MA. Examples of query and read-only information include performance metric information and resource status and monitoring information

Returns:

  • (String)


39
40
41
# File 'lib/oci/golden_gate/models/group_to_roles_mapping_details.rb', line 39

def user_group_id
  @user_group_id
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



42
43
44
45
46
47
48
49
50
51
# File 'lib/oci/golden_gate/models/group_to_roles_mapping_details.rb', line 42

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'security_group_id': :'securityGroupId',
    'administrator_group_id': :'administratorGroupId',
    'operator_group_id': :'operatorGroupId',
    'user_group_id': :'userGroupId'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



54
55
56
57
58
59
60
61
62
63
# File 'lib/oci/golden_gate/models/group_to_roles_mapping_details.rb', line 54

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'security_group_id': :'String',
    'administrator_group_id': :'String',
    'operator_group_id': :'String',
    'user_group_id': :'String'
    # rubocop:enable Style/SymbolLiteral
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • other (Object)

    the other object to be compared



113
114
115
116
117
118
119
120
121
# File 'lib/oci/golden_gate/models/group_to_roles_mapping_details.rb', line 113

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    security_group_id == other.security_group_id &&
    administrator_group_id == other.administrator_group_id &&
    operator_group_id == other.operator_group_id &&
    user_group_id == other.user_group_id
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# File 'lib/oci/golden_gate/models/group_to_roles_mapping_details.rb', line 146

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)

  self.class.swagger_types.each_pair do |key, type|
    if type =~ /^Array<(.*)>/i
      # check to ensure the input is an array given that the the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        public_method("#{key}=").call(
          attributes[self.class.attribute_map[key]]
            .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
        )
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      public_method("#{key}=").call(
        OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
      )
    end
    # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end

#eql?(other) ⇒ Boolean

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


126
127
128
# File 'lib/oci/golden_gate/models/group_to_roles_mapping_details.rb', line 126

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



135
136
137
# File 'lib/oci/golden_gate/models/group_to_roles_mapping_details.rb', line 135

def hash
  [security_group_id, administrator_group_id, operator_group_id, user_group_id].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



179
180
181
182
183
184
185
186
187
188
# File 'lib/oci/golden_gate/models/group_to_roles_mapping_details.rb', line 179

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = public_method(attr).call
    next if value.nil? && !instance_variable_defined?("@#{attr}")

    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



173
174
175
# File 'lib/oci/golden_gate/models/group_to_roles_mapping_details.rb', line 173

def to_s
  to_hash.to_s
end