=begin #Datadog API V1 Collection #Collection of all Datadog Public endpoints. The version of the OpenAPI document: 1.0 Contact: support@datadoghq.com Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2020-Present Datadog, Inc. =end require 'date' require 'time' module DatadogAPIClient::V1 # Your Google Cloud Platform Account. class GCPAccount include BaseGenericModel # Should be `https://www.googleapis.com/oauth2/v1/certs`. attr_accessor :auth_provider_x509_cert_url # Should be `https://accounts.google.com/o/oauth2/auth`. attr_accessor :auth_uri # Silence monitors for expected GCE instance shutdowns. attr_accessor :automute # Your email found in your JSON service account key. attr_accessor :client_email # Your ID found in your JSON service account key. attr_accessor :client_id # Should be `https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL` # where `$CLIENT_EMAIL` is the email found in your JSON service account key. attr_accessor :client_x509_cert_url # Limit the Cloud Run revisions that are pulled into Datadog by using tags. # Only Cloud Run revision resources that apply to specified filters are imported into Datadog. attr_accessor :cloud_run_revision_filters # An array of errors. attr_accessor :errors # Limit the GCE instances that are pulled into Datadog by using tags. # Only hosts that match one of the defined tags are imported into Datadog. attr_accessor :host_filters # When enabled, Datadog will activate the Cloud Security Monitoring product for this service account. Note: This requires resource_collection_enabled to be set to true. attr_accessor :is_cspm_enabled # When enabled, Datadog will attempt to collect Security Command Center Findings. Note: This requires additional permissions on the service account. attr_accessor :is_security_command_center_enabled # Your private key name found in your JSON service account key. attr_accessor :private_key # Your private key ID found in your JSON service account key. attr_accessor :private_key_id # Your Google Cloud project ID found in your JSON service account key. attr_accessor :project_id # When enabled, Datadog scans for all resources in your GCP environment. attr_accessor :resource_collection_enabled # Should be `https://accounts.google.com/o/oauth2/token`. attr_accessor :token_uri # The value for service_account found in your JSON service account key. attr_accessor :type attr_accessor :additional_properties # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map { :'auth_provider_x509_cert_url' => :'auth_provider_x509_cert_url', :'auth_uri' => :'auth_uri', :'automute' => :'automute', :'client_email' => :'client_email', :'client_id' => :'client_id', :'client_x509_cert_url' => :'client_x509_cert_url', :'cloud_run_revision_filters' => :'cloud_run_revision_filters', :'errors' => :'errors', :'host_filters' => :'host_filters', :'is_cspm_enabled' => :'is_cspm_enabled', :'is_security_command_center_enabled' => :'is_security_command_center_enabled', :'private_key' => :'private_key', :'private_key_id' => :'private_key_id', :'project_id' => :'project_id', :'resource_collection_enabled' => :'resource_collection_enabled', :'token_uri' => :'token_uri', :'type' => :'type' } end # Attribute type mapping. # @!visibility private def self.openapi_types { :'auth_provider_x509_cert_url' => :'String', :'auth_uri' => :'String', :'automute' => :'Boolean', :'client_email' => :'String', :'client_id' => :'String', :'client_x509_cert_url' => :'String', :'cloud_run_revision_filters' => :'Array', :'errors' => :'Array', :'host_filters' => :'String', :'is_cspm_enabled' => :'Boolean', :'is_security_command_center_enabled' => :'Boolean', :'private_key' => :'String', :'private_key_id' => :'String', :'project_id' => :'String', :'resource_collection_enabled' => :'Boolean', :'token_uri' => :'String', :'type' => :'String' } end # Initializes the object # @param attributes [Hash] Model attributes in the form of hash # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::GCPAccount` initialize method" end self.additional_properties = {} # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) self.additional_properties[k.to_sym] = v else h[k.to_sym] = v end } if attributes.key?(:'auth_provider_x509_cert_url') self.auth_provider_x509_cert_url = attributes[:'auth_provider_x509_cert_url'] end if attributes.key?(:'auth_uri') self.auth_uri = attributes[:'auth_uri'] end if attributes.key?(:'automute') self.automute = attributes[:'automute'] end if attributes.key?(:'client_email') self.client_email = attributes[:'client_email'] end if attributes.key?(:'client_id') self.client_id = attributes[:'client_id'] end if attributes.key?(:'client_x509_cert_url') self.client_x509_cert_url = attributes[:'client_x509_cert_url'] end if attributes.key?(:'cloud_run_revision_filters') if (value = attributes[:'cloud_run_revision_filters']).is_a?(Array) self.cloud_run_revision_filters = value end end if attributes.key?(:'errors') if (value = attributes[:'errors']).is_a?(Array) self.errors = value end end if attributes.key?(:'host_filters') self.host_filters = attributes[:'host_filters'] end if attributes.key?(:'is_cspm_enabled') self.is_cspm_enabled = attributes[:'is_cspm_enabled'] end if attributes.key?(:'is_security_command_center_enabled') self.is_security_command_center_enabled = attributes[:'is_security_command_center_enabled'] end if attributes.key?(:'private_key') self.private_key = attributes[:'private_key'] end if attributes.key?(:'private_key_id') self.private_key_id = attributes[:'private_key_id'] end if attributes.key?(:'project_id') self.project_id = attributes[:'project_id'] end if attributes.key?(:'resource_collection_enabled') self.resource_collection_enabled = attributes[:'resource_collection_enabled'] end if attributes.key?(:'token_uri') self.token_uri = attributes[:'token_uri'] end if attributes.key?(:'type') self.type = attributes[:'type'] end end # Returns the object in the form of hash, with additionalProperties support. # @return [Hash] Returns the object in the form of hash # @!visibility private def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end self.additional_properties.each_pair do |attr, value| hash[attr] = value end hash end # Checks equality by comparing each attribute. # @param o [Object] Object to be compared # @!visibility private def ==(o) return true if self.equal?(o) self.class == o.class && auth_provider_x509_cert_url == o.auth_provider_x509_cert_url && auth_uri == o.auth_uri && automute == o.automute && client_email == o.client_email && client_id == o.client_id && client_x509_cert_url == o.client_x509_cert_url && cloud_run_revision_filters == o.cloud_run_revision_filters && errors == o.errors && host_filters == o.host_filters && is_cspm_enabled == o.is_cspm_enabled && is_security_command_center_enabled == o.is_security_command_center_enabled && private_key == o.private_key && private_key_id == o.private_key_id && project_id == o.project_id && resource_collection_enabled == o.resource_collection_enabled && token_uri == o.token_uri && type == o.type additional_properties == o.additional_properties end # Calculates hash code according to all attributes. # @return [Integer] Hash code # @!visibility private def hash [auth_provider_x509_cert_url, auth_uri, automute, client_email, client_id, client_x509_cert_url, cloud_run_revision_filters, errors, host_filters, is_cspm_enabled, is_security_command_center_enabled, private_key, private_key_id, project_id, resource_collection_enabled, token_uri, type].hash end end end