Class: OCI::ObjectStorage::Models::PrivateEndpointSummary

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/object_storage/models/private_endpoint_summary.rb

Overview

To use any of the API operations, you must be authorized in an IAM policy. If you are not authorized, talk to an administrator. If you are an administrator who needs to write policies to give users access, see Getting Started with Policies.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ PrivateEndpointSummary

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :name (String)

    The value to assign to the #name property

  • :namespace (String)

    The value to assign to the #namespace property

  • :compartment_id (String)

    The value to assign to the #compartment_id property

  • :created_by (String)

    The value to assign to the #created_by property

  • :time_created (DateTime)

    The value to assign to the #time_created property

  • :time_modified (DateTime)

    The value to assign to the #time_modified property

  • :prefix (String)

    The value to assign to the #prefix property

  • :fqdns (OCI::ObjectStorage::Models::Fqdns)

    The value to assign to the #fqdns property

  • :etag (String)

    The value to assign to the #etag property

  • :lifecycle_state (String)

    The value to assign to the #lifecycle_state property



111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
# File 'lib/oci/object_storage/models/private_endpoint_summary.rb', line 111

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.name = attributes[:'name'] if attributes[:'name']

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

  self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId']

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

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

  self.created_by = attributes[:'createdBy'] if attributes[:'createdBy']

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

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

  self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated']

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

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

  self.time_modified = attributes[:'timeModified'] if attributes[:'timeModified']

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

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

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

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

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

  self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState']

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

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

Instance Attribute Details

#compartment_idString

[Required] The compartment ID in which the Private Endpoint is authorized.

Returns:

  • (String)


26
27
28
# File 'lib/oci/object_storage/models/private_endpoint_summary.rb', line 26

def compartment_id
  @compartment_id
end

#created_byString

[Required] The OCID of the user who created the Private Endpoint.

Returns:

  • (String)


30
31
32
# File 'lib/oci/object_storage/models/private_endpoint_summary.rb', line 30

def created_by
  @created_by
end

#etagString

[Required] The entity tag for the Private Endpoint.

Returns:

  • (String)


53
54
55
# File 'lib/oci/object_storage/models/private_endpoint_summary.rb', line 53

def etag
  @etag
end

#fqdnsOCI::ObjectStorage::Models::Fqdns

This attribute is required.



49
50
51
# File 'lib/oci/object_storage/models/private_endpoint_summary.rb', line 49

def fqdns
  @fqdns
end

#lifecycle_stateString

[Required] The summaries of Private Endpoints' lifecycle state.

Returns:

  • (String)


57
58
59
# File 'lib/oci/object_storage/models/private_endpoint_summary.rb', line 57

def lifecycle_state
  @lifecycle_state
end

#nameString

[Required] The name given to the Private Endpoint. Avoid entering confidential information. Example: my-new-pe1

Returns:

  • (String)


18
19
20
# File 'lib/oci/object_storage/models/private_endpoint_summary.rb', line 18

def name
  @name
end

#namespaceString

[Required] The Object Storage namespace with which the Private Endpoint is associated.

Returns:

  • (String)


22
23
24
# File 'lib/oci/object_storage/models/private_endpoint_summary.rb', line 22

def namespace
  @namespace
end

#prefixString

[Required] A prefix to use for the private endpoint. The customer VCN's DNS records are updated with this prefix. The prefix input from the customer will be the first sub-domain in the endpointFqdn. Example: If the prefix chosen is "abc", then the endpointFqdn will be 'abc.private.objectstorage.<region>.oraclecloud.com'

Returns:

  • (String)


45
46
47
# File 'lib/oci/object_storage/models/private_endpoint_summary.rb', line 45

def prefix
  @prefix
end

#time_createdDateTime

[Required] The date and time the Private Endpoint was created, as described in RFC 2616.

Returns:

  • (DateTime)


34
35
36
# File 'lib/oci/object_storage/models/private_endpoint_summary.rb', line 34

def time_created
  @time_created
end

#time_modifiedDateTime

[Required] The date and time the Private Endpoint was updated, as described in RFC 2616.

Returns:

  • (DateTime)


38
39
40
# File 'lib/oci/object_storage/models/private_endpoint_summary.rb', line 38

def time_modified
  @time_modified
end

Class Method Details

.attribute_mapObject

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



60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# File 'lib/oci/object_storage/models/private_endpoint_summary.rb', line 60

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'name': :'name',
    'namespace': :'namespace',
    'compartment_id': :'compartmentId',
    'created_by': :'createdBy',
    'time_created': :'timeCreated',
    'time_modified': :'timeModified',
    'prefix': :'prefix',
    'fqdns': :'fqdns',
    'etag': :'etag',
    'lifecycle_state': :'lifecycleState'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# File 'lib/oci/object_storage/models/private_endpoint_summary.rb', line 78

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'name': :'String',
    'namespace': :'String',
    'compartment_id': :'String',
    'created_by': :'String',
    'time_created': :'DateTime',
    'time_modified': :'DateTime',
    'prefix': :'String',
    'fqdns': :'OCI::ObjectStorage::Models::Fqdns',
    'etag': :'String',
    'lifecycle_state': :'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



165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
# File 'lib/oci/object_storage/models/private_endpoint_summary.rb', line 165

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

  self.class == other.class &&
    name == other.name &&
    namespace == other.namespace &&
    compartment_id == other.compartment_id &&
    created_by == other.created_by &&
    time_created == other.time_created &&
    time_modified == other.time_modified &&
    prefix == other.prefix &&
    fqdns == other.fqdns &&
    etag == other.etag &&
    lifecycle_state == other.lifecycle_state
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



204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
# File 'lib/oci/object_storage/models/private_endpoint_summary.rb', line 204

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


184
185
186
# File 'lib/oci/object_storage/models/private_endpoint_summary.rb', line 184

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



193
194
195
# File 'lib/oci/object_storage/models/private_endpoint_summary.rb', line 193

def hash
  [name, namespace, compartment_id, created_by, time_created, time_modified, prefix, fqdns, etag, lifecycle_state].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



237
238
239
240
241
242
243
244
245
246
# File 'lib/oci/object_storage/models/private_endpoint_summary.rb', line 237

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



231
232
233
# File 'lib/oci/object_storage/models/private_endpoint_summary.rb', line 231

def to_s
  to_hash.to_s
end