diff --git a/api_names.yaml b/api_names.yaml index d8d3aab5f..b0270dc1c 100644 --- a/api_names.yaml +++ b/api_names.yaml @@ -33179,3 +33179,202 @@ /sheets:v4/InsertRangeRequest/range: range /sheets:v4/Request/insertRange: insert_range /sheets:v4/Request/deleteRange: delete_range +/dns:v2beta1/fields: fields +/dns:v2beta1/key: key +/dns:v2beta1/quotaUser: quota_user +/dns:v2beta1/userIp: user_ip +/dns:v2beta1/dns.changes.create: create_change +/dns:v2beta1/dns.changes.create/clientOperationId: client_operation_id +/dns:v2beta1/dns.changes.create/managedZone: managed_zone +/dns:v2beta1/dns.changes.create/project: project +/dns:v2beta1/dns.changes.get: get_change +/dns:v2beta1/dns.changes.get/changeId: change_id +/dns:v2beta1/dns.changes.get/clientOperationId: client_operation_id +/dns:v2beta1/dns.changes.get/managedZone: managed_zone +/dns:v2beta1/dns.changes.get/project: project +/dns:v2beta1/dns.changes.list: list_changes +/dns:v2beta1/dns.changes.list/managedZone: managed_zone +/dns:v2beta1/dns.changes.list/maxResults: max_results +/dns:v2beta1/dns.changes.list/pageToken: page_token +/dns:v2beta1/dns.changes.list/project: project +/dns:v2beta1/dns.changes.list/sortBy: sort_by +/dns:v2beta1/dns.changes.list/sortOrder: sort_order +/dns:v2beta1/dns.dnsKeys.get: get_dns_key +/dns:v2beta1/dns.dnsKeys.get/clientOperationId: client_operation_id +/dns:v2beta1/dns.dnsKeys.get/digestType: digest_type +/dns:v2beta1/dns.dnsKeys.get/dnsKeyId: dns_key_id +/dns:v2beta1/dns.dnsKeys.get/managedZone: managed_zone +/dns:v2beta1/dns.dnsKeys.get/project: project +/dns:v2beta1/dns.dnsKeys.list: list_dns_keys +/dns:v2beta1/dns.dnsKeys.list/digestType: digest_type +/dns:v2beta1/dns.dnsKeys.list/managedZone: managed_zone +/dns:v2beta1/dns.dnsKeys.list/maxResults: max_results +/dns:v2beta1/dns.dnsKeys.list/pageToken: page_token +/dns:v2beta1/dns.dnsKeys.list/project: project +/dns:v2beta1/dns.managedZoneOperations.get: get_managed_zone_operation +/dns:v2beta1/dns.managedZoneOperations.get/clientOperationId: client_operation_id +/dns:v2beta1/dns.managedZoneOperations.get/managedZone: managed_zone +/dns:v2beta1/dns.managedZoneOperations.get/operation: operation +/dns:v2beta1/dns.managedZoneOperations.get/project: project +/dns:v2beta1/dns.managedZoneOperations.list: list_managed_zone_operations +/dns:v2beta1/dns.managedZoneOperations.list/managedZone: managed_zone +/dns:v2beta1/dns.managedZoneOperations.list/maxResults: max_results +/dns:v2beta1/dns.managedZoneOperations.list/pageToken: page_token +/dns:v2beta1/dns.managedZoneOperations.list/project: project +/dns:v2beta1/dns.managedZoneOperations.list/sortBy: sort_by +/dns:v2beta1/dns.managedZones.create: create_managed_zone +/dns:v2beta1/dns.managedZones.create/clientOperationId: client_operation_id +/dns:v2beta1/dns.managedZones.create/project: project +/dns:v2beta1/dns.managedZones.delete: delete_managed_zone +/dns:v2beta1/dns.managedZones.delete/clientOperationId: client_operation_id +/dns:v2beta1/dns.managedZones.delete/managedZone: managed_zone +/dns:v2beta1/dns.managedZones.delete/project: project +/dns:v2beta1/dns.managedZones.get: get_managed_zone +/dns:v2beta1/dns.managedZones.get/clientOperationId: client_operation_id +/dns:v2beta1/dns.managedZones.get/managedZone: managed_zone +/dns:v2beta1/dns.managedZones.get/project: project +/dns:v2beta1/dns.managedZones.list: list_managed_zones +/dns:v2beta1/dns.managedZones.list/dnsName: dns_name +/dns:v2beta1/dns.managedZones.list/maxResults: max_results +/dns:v2beta1/dns.managedZones.list/pageToken: page_token +/dns:v2beta1/dns.managedZones.list/project: project +/dns:v2beta1/dns.managedZones.patch: patch_managed_zone +/dns:v2beta1/dns.managedZones.patch/clientOperationId: client_operation_id +/dns:v2beta1/dns.managedZones.patch/managedZone: managed_zone +/dns:v2beta1/dns.managedZones.patch/project: project +/dns:v2beta1/dns.managedZones.update: update_managed_zone +/dns:v2beta1/dns.managedZones.update/clientOperationId: client_operation_id +/dns:v2beta1/dns.managedZones.update/managedZone: managed_zone +/dns:v2beta1/dns.managedZones.update/project: project +/dns:v2beta1/dns.projects.get: get_project +/dns:v2beta1/dns.projects.get/clientOperationId: client_operation_id +/dns:v2beta1/dns.projects.get/project: project +/dns:v2beta1/dns.resourceRecordSets.list: list_resource_record_sets +/dns:v2beta1/dns.resourceRecordSets.list/managedZone: managed_zone +/dns:v2beta1/dns.resourceRecordSets.list/maxResults: max_results +/dns:v2beta1/dns.resourceRecordSets.list/name: name +/dns:v2beta1/dns.resourceRecordSets.list/pageToken: page_token +/dns:v2beta1/dns.resourceRecordSets.list/project: project +/dns:v2beta1/dns.resourceRecordSets.list/type: type +/dns:v2beta1/Change: change +/dns:v2beta1/Change/additions: additions +/dns:v2beta1/Change/additions/addition: addition +/dns:v2beta1/Change/deletions: deletions +/dns:v2beta1/Change/deletions/deletion: deletion +/dns:v2beta1/Change/id: id +/dns:v2beta1/Change/isServing: is_serving +/dns:v2beta1/Change/kind: kind +/dns:v2beta1/Change/startTime: start_time +/dns:v2beta1/Change/status: status +/dns:v2beta1/ChangesListResponse: changes_list_response +/dns:v2beta1/ChangesListResponse/changes: changes +/dns:v2beta1/ChangesListResponse/changes/change: change +/dns:v2beta1/ChangesListResponse/header: header +/dns:v2beta1/ChangesListResponse/kind: kind +/dns:v2beta1/ChangesListResponse/nextPageToken: next_page_token +/dns:v2beta1/DnsKey: dns_key +/dns:v2beta1/DnsKey/algorithm: algorithm +/dns:v2beta1/DnsKey/creationTime: creation_time +/dns:v2beta1/DnsKey/description: description +/dns:v2beta1/DnsKey/digests: digests +/dns:v2beta1/DnsKey/digests/digest: digest +/dns:v2beta1/DnsKey/id: id +/dns:v2beta1/DnsKey/isActive: is_active +/dns:v2beta1/DnsKey/keyLength: key_length +/dns:v2beta1/DnsKey/keyTag: key_tag +/dns:v2beta1/DnsKey/kind: kind +/dns:v2beta1/DnsKey/publicKey: public_key +/dns:v2beta1/DnsKey/type: type +/dns:v2beta1/DnsKeyDigest: dns_key_digest +/dns:v2beta1/DnsKeyDigest/digest: digest +/dns:v2beta1/DnsKeyDigest/type: type +/dns:v2beta1/DnsKeySpec: dns_key_spec +/dns:v2beta1/DnsKeySpec/algorithm: algorithm +/dns:v2beta1/DnsKeySpec/keyLength: key_length +/dns:v2beta1/DnsKeySpec/keyType: key_type +/dns:v2beta1/DnsKeySpec/kind: kind +/dns:v2beta1/DnsKeysListResponse: dns_keys_list_response +/dns:v2beta1/DnsKeysListResponse/dnsKeys: dns_keys +/dns:v2beta1/DnsKeysListResponse/dnsKeys/dns_key: dns_key +/dns:v2beta1/DnsKeysListResponse/header: header +/dns:v2beta1/DnsKeysListResponse/kind: kind +/dns:v2beta1/DnsKeysListResponse/nextPageToken: next_page_token +/dns:v2beta1/ManagedZone: managed_zone +/dns:v2beta1/ManagedZone/creationTime: creation_time +/dns:v2beta1/ManagedZone/description: description +/dns:v2beta1/ManagedZone/dnsName: dns_name +/dns:v2beta1/ManagedZone/dnssecConfig: dnssec_config +/dns:v2beta1/ManagedZone/id: id +/dns:v2beta1/ManagedZone/kind: kind +/dns:v2beta1/ManagedZone/name: name +/dns:v2beta1/ManagedZone/nameServerSet: name_server_set +/dns:v2beta1/ManagedZone/nameServers: name_servers +/dns:v2beta1/ManagedZone/nameServers/name_server: name_server +/dns:v2beta1/ManagedZoneDnsSecConfig: managed_zone_dns_sec_config +/dns:v2beta1/ManagedZoneDnsSecConfig/defaultKeySpecs: default_key_specs +/dns:v2beta1/ManagedZoneDnsSecConfig/defaultKeySpecs/default_key_spec: default_key_spec +/dns:v2beta1/ManagedZoneDnsSecConfig/kind: kind +/dns:v2beta1/ManagedZoneDnsSecConfig/nonExistence: non_existence +/dns:v2beta1/ManagedZoneDnsSecConfig/state: state +/dns:v2beta1/ManagedZoneOperationsListResponse: managed_zone_operations_list_response +/dns:v2beta1/ManagedZoneOperationsListResponse/header: header +/dns:v2beta1/ManagedZoneOperationsListResponse/kind: kind +/dns:v2beta1/ManagedZoneOperationsListResponse/nextPageToken: next_page_token +/dns:v2beta1/ManagedZoneOperationsListResponse/operations: operations +/dns:v2beta1/ManagedZoneOperationsListResponse/operations/operation: operation +/dns:v2beta1/ManagedZonesDeleteResponse: managed_zones_delete_response +/dns:v2beta1/ManagedZonesDeleteResponse/header: header +/dns:v2beta1/ManagedZonesListResponse: managed_zones_list_response +/dns:v2beta1/ManagedZonesListResponse/header: header +/dns:v2beta1/ManagedZonesListResponse/kind: kind +/dns:v2beta1/ManagedZonesListResponse/managedZones: managed_zones +/dns:v2beta1/ManagedZonesListResponse/managedZones/managed_zone: managed_zone +/dns:v2beta1/ManagedZonesListResponse/nextPageToken: next_page_token +/dns:v2beta1/Operation: operation +/dns:v2beta1/Operation/dnsKeyContext: dns_key_context +/dns:v2beta1/Operation/id: id +/dns:v2beta1/Operation/kind: kind +/dns:v2beta1/Operation/startTime: start_time +/dns:v2beta1/Operation/status: status +/dns:v2beta1/Operation/type: type +/dns:v2beta1/Operation/user: user +/dns:v2beta1/Operation/zoneContext: zone_context +/dns:v2beta1/OperationDnsKeyContext: operation_dns_key_context +/dns:v2beta1/OperationDnsKeyContext/newValue: new_value +/dns:v2beta1/OperationDnsKeyContext/oldValue: old_value +/dns:v2beta1/OperationManagedZoneContext: operation_managed_zone_context +/dns:v2beta1/OperationManagedZoneContext/newValue: new_value +/dns:v2beta1/OperationManagedZoneContext/oldValue: old_value +/dns:v2beta1/Project: project +/dns:v2beta1/Project/id: id +/dns:v2beta1/Project/kind: kind +/dns:v2beta1/Project/number: number +/dns:v2beta1/Project/quota: quota +/dns:v2beta1/Quota: quota +/dns:v2beta1/Quota/dnsKeysPerManagedZone: dns_keys_per_managed_zone +/dns:v2beta1/Quota/kind: kind +/dns:v2beta1/Quota/managedZones: managed_zones +/dns:v2beta1/Quota/resourceRecordsPerRrset: resource_records_per_rrset +/dns:v2beta1/Quota/rrsetAdditionsPerChange: rrset_additions_per_change +/dns:v2beta1/Quota/rrsetDeletionsPerChange: rrset_deletions_per_change +/dns:v2beta1/Quota/rrsetsPerManagedZone: rrsets_per_managed_zone +/dns:v2beta1/Quota/totalRrdataSizePerChange: total_rrdata_size_per_change +/dns:v2beta1/Quota/whitelistedKeySpecs: whitelisted_key_specs +/dns:v2beta1/Quota/whitelistedKeySpecs/whitelisted_key_spec: whitelisted_key_spec +/dns:v2beta1/ResourceRecordSet: resource_record_set +/dns:v2beta1/ResourceRecordSet/kind: kind +/dns:v2beta1/ResourceRecordSet/name: name +/dns:v2beta1/ResourceRecordSet/rrdatas: rrdatas +/dns:v2beta1/ResourceRecordSet/rrdatas/rrdata: rrdata +/dns:v2beta1/ResourceRecordSet/signatureRrdatas: signature_rrdatas +/dns:v2beta1/ResourceRecordSet/signatureRrdatas/signature_rrdata: signature_rrdata +/dns:v2beta1/ResourceRecordSet/ttl: ttl +/dns:v2beta1/ResourceRecordSet/type: type +/dns:v2beta1/ResourceRecordSetsListResponse: resource_record_sets_list_response +/dns:v2beta1/ResourceRecordSetsListResponse/header: header +/dns:v2beta1/ResourceRecordSetsListResponse/kind: kind +/dns:v2beta1/ResourceRecordSetsListResponse/nextPageToken: next_page_token +/dns:v2beta1/ResourceRecordSetsListResponse/rrsets: rrsets +/dns:v2beta1/ResourceRecordSetsListResponse/rrsets/rrset: rrset +/dns:v2beta1/ResponseHeader: response_header +/dns:v2beta1/ResponseHeader/operationId: operation_id diff --git a/api_names_out.yaml b/api_names_out.yaml index d8d3aab5f..b0270dc1c 100644 --- a/api_names_out.yaml +++ b/api_names_out.yaml @@ -33179,3 +33179,202 @@ /sheets:v4/InsertRangeRequest/range: range /sheets:v4/Request/insertRange: insert_range /sheets:v4/Request/deleteRange: delete_range +/dns:v2beta1/fields: fields +/dns:v2beta1/key: key +/dns:v2beta1/quotaUser: quota_user +/dns:v2beta1/userIp: user_ip +/dns:v2beta1/dns.changes.create: create_change +/dns:v2beta1/dns.changes.create/clientOperationId: client_operation_id +/dns:v2beta1/dns.changes.create/managedZone: managed_zone +/dns:v2beta1/dns.changes.create/project: project +/dns:v2beta1/dns.changes.get: get_change +/dns:v2beta1/dns.changes.get/changeId: change_id +/dns:v2beta1/dns.changes.get/clientOperationId: client_operation_id +/dns:v2beta1/dns.changes.get/managedZone: managed_zone +/dns:v2beta1/dns.changes.get/project: project +/dns:v2beta1/dns.changes.list: list_changes +/dns:v2beta1/dns.changes.list/managedZone: managed_zone +/dns:v2beta1/dns.changes.list/maxResults: max_results +/dns:v2beta1/dns.changes.list/pageToken: page_token +/dns:v2beta1/dns.changes.list/project: project +/dns:v2beta1/dns.changes.list/sortBy: sort_by +/dns:v2beta1/dns.changes.list/sortOrder: sort_order +/dns:v2beta1/dns.dnsKeys.get: get_dns_key +/dns:v2beta1/dns.dnsKeys.get/clientOperationId: client_operation_id +/dns:v2beta1/dns.dnsKeys.get/digestType: digest_type +/dns:v2beta1/dns.dnsKeys.get/dnsKeyId: dns_key_id +/dns:v2beta1/dns.dnsKeys.get/managedZone: managed_zone +/dns:v2beta1/dns.dnsKeys.get/project: project +/dns:v2beta1/dns.dnsKeys.list: list_dns_keys +/dns:v2beta1/dns.dnsKeys.list/digestType: digest_type +/dns:v2beta1/dns.dnsKeys.list/managedZone: managed_zone +/dns:v2beta1/dns.dnsKeys.list/maxResults: max_results +/dns:v2beta1/dns.dnsKeys.list/pageToken: page_token +/dns:v2beta1/dns.dnsKeys.list/project: project +/dns:v2beta1/dns.managedZoneOperations.get: get_managed_zone_operation +/dns:v2beta1/dns.managedZoneOperations.get/clientOperationId: client_operation_id +/dns:v2beta1/dns.managedZoneOperations.get/managedZone: managed_zone +/dns:v2beta1/dns.managedZoneOperations.get/operation: operation +/dns:v2beta1/dns.managedZoneOperations.get/project: project +/dns:v2beta1/dns.managedZoneOperations.list: list_managed_zone_operations +/dns:v2beta1/dns.managedZoneOperations.list/managedZone: managed_zone +/dns:v2beta1/dns.managedZoneOperations.list/maxResults: max_results +/dns:v2beta1/dns.managedZoneOperations.list/pageToken: page_token +/dns:v2beta1/dns.managedZoneOperations.list/project: project +/dns:v2beta1/dns.managedZoneOperations.list/sortBy: sort_by +/dns:v2beta1/dns.managedZones.create: create_managed_zone +/dns:v2beta1/dns.managedZones.create/clientOperationId: client_operation_id +/dns:v2beta1/dns.managedZones.create/project: project +/dns:v2beta1/dns.managedZones.delete: delete_managed_zone +/dns:v2beta1/dns.managedZones.delete/clientOperationId: client_operation_id +/dns:v2beta1/dns.managedZones.delete/managedZone: managed_zone +/dns:v2beta1/dns.managedZones.delete/project: project +/dns:v2beta1/dns.managedZones.get: get_managed_zone +/dns:v2beta1/dns.managedZones.get/clientOperationId: client_operation_id +/dns:v2beta1/dns.managedZones.get/managedZone: managed_zone +/dns:v2beta1/dns.managedZones.get/project: project +/dns:v2beta1/dns.managedZones.list: list_managed_zones +/dns:v2beta1/dns.managedZones.list/dnsName: dns_name +/dns:v2beta1/dns.managedZones.list/maxResults: max_results +/dns:v2beta1/dns.managedZones.list/pageToken: page_token +/dns:v2beta1/dns.managedZones.list/project: project +/dns:v2beta1/dns.managedZones.patch: patch_managed_zone +/dns:v2beta1/dns.managedZones.patch/clientOperationId: client_operation_id +/dns:v2beta1/dns.managedZones.patch/managedZone: managed_zone +/dns:v2beta1/dns.managedZones.patch/project: project +/dns:v2beta1/dns.managedZones.update: update_managed_zone +/dns:v2beta1/dns.managedZones.update/clientOperationId: client_operation_id +/dns:v2beta1/dns.managedZones.update/managedZone: managed_zone +/dns:v2beta1/dns.managedZones.update/project: project +/dns:v2beta1/dns.projects.get: get_project +/dns:v2beta1/dns.projects.get/clientOperationId: client_operation_id +/dns:v2beta1/dns.projects.get/project: project +/dns:v2beta1/dns.resourceRecordSets.list: list_resource_record_sets +/dns:v2beta1/dns.resourceRecordSets.list/managedZone: managed_zone +/dns:v2beta1/dns.resourceRecordSets.list/maxResults: max_results +/dns:v2beta1/dns.resourceRecordSets.list/name: name +/dns:v2beta1/dns.resourceRecordSets.list/pageToken: page_token +/dns:v2beta1/dns.resourceRecordSets.list/project: project +/dns:v2beta1/dns.resourceRecordSets.list/type: type +/dns:v2beta1/Change: change +/dns:v2beta1/Change/additions: additions +/dns:v2beta1/Change/additions/addition: addition +/dns:v2beta1/Change/deletions: deletions +/dns:v2beta1/Change/deletions/deletion: deletion +/dns:v2beta1/Change/id: id +/dns:v2beta1/Change/isServing: is_serving +/dns:v2beta1/Change/kind: kind +/dns:v2beta1/Change/startTime: start_time +/dns:v2beta1/Change/status: status +/dns:v2beta1/ChangesListResponse: changes_list_response +/dns:v2beta1/ChangesListResponse/changes: changes +/dns:v2beta1/ChangesListResponse/changes/change: change +/dns:v2beta1/ChangesListResponse/header: header +/dns:v2beta1/ChangesListResponse/kind: kind +/dns:v2beta1/ChangesListResponse/nextPageToken: next_page_token +/dns:v2beta1/DnsKey: dns_key +/dns:v2beta1/DnsKey/algorithm: algorithm +/dns:v2beta1/DnsKey/creationTime: creation_time +/dns:v2beta1/DnsKey/description: description +/dns:v2beta1/DnsKey/digests: digests +/dns:v2beta1/DnsKey/digests/digest: digest +/dns:v2beta1/DnsKey/id: id +/dns:v2beta1/DnsKey/isActive: is_active +/dns:v2beta1/DnsKey/keyLength: key_length +/dns:v2beta1/DnsKey/keyTag: key_tag +/dns:v2beta1/DnsKey/kind: kind +/dns:v2beta1/DnsKey/publicKey: public_key +/dns:v2beta1/DnsKey/type: type +/dns:v2beta1/DnsKeyDigest: dns_key_digest +/dns:v2beta1/DnsKeyDigest/digest: digest +/dns:v2beta1/DnsKeyDigest/type: type +/dns:v2beta1/DnsKeySpec: dns_key_spec +/dns:v2beta1/DnsKeySpec/algorithm: algorithm +/dns:v2beta1/DnsKeySpec/keyLength: key_length +/dns:v2beta1/DnsKeySpec/keyType: key_type +/dns:v2beta1/DnsKeySpec/kind: kind +/dns:v2beta1/DnsKeysListResponse: dns_keys_list_response +/dns:v2beta1/DnsKeysListResponse/dnsKeys: dns_keys +/dns:v2beta1/DnsKeysListResponse/dnsKeys/dns_key: dns_key +/dns:v2beta1/DnsKeysListResponse/header: header +/dns:v2beta1/DnsKeysListResponse/kind: kind +/dns:v2beta1/DnsKeysListResponse/nextPageToken: next_page_token +/dns:v2beta1/ManagedZone: managed_zone +/dns:v2beta1/ManagedZone/creationTime: creation_time +/dns:v2beta1/ManagedZone/description: description +/dns:v2beta1/ManagedZone/dnsName: dns_name +/dns:v2beta1/ManagedZone/dnssecConfig: dnssec_config +/dns:v2beta1/ManagedZone/id: id +/dns:v2beta1/ManagedZone/kind: kind +/dns:v2beta1/ManagedZone/name: name +/dns:v2beta1/ManagedZone/nameServerSet: name_server_set +/dns:v2beta1/ManagedZone/nameServers: name_servers +/dns:v2beta1/ManagedZone/nameServers/name_server: name_server +/dns:v2beta1/ManagedZoneDnsSecConfig: managed_zone_dns_sec_config +/dns:v2beta1/ManagedZoneDnsSecConfig/defaultKeySpecs: default_key_specs +/dns:v2beta1/ManagedZoneDnsSecConfig/defaultKeySpecs/default_key_spec: default_key_spec +/dns:v2beta1/ManagedZoneDnsSecConfig/kind: kind +/dns:v2beta1/ManagedZoneDnsSecConfig/nonExistence: non_existence +/dns:v2beta1/ManagedZoneDnsSecConfig/state: state +/dns:v2beta1/ManagedZoneOperationsListResponse: managed_zone_operations_list_response +/dns:v2beta1/ManagedZoneOperationsListResponse/header: header +/dns:v2beta1/ManagedZoneOperationsListResponse/kind: kind +/dns:v2beta1/ManagedZoneOperationsListResponse/nextPageToken: next_page_token +/dns:v2beta1/ManagedZoneOperationsListResponse/operations: operations +/dns:v2beta1/ManagedZoneOperationsListResponse/operations/operation: operation +/dns:v2beta1/ManagedZonesDeleteResponse: managed_zones_delete_response +/dns:v2beta1/ManagedZonesDeleteResponse/header: header +/dns:v2beta1/ManagedZonesListResponse: managed_zones_list_response +/dns:v2beta1/ManagedZonesListResponse/header: header +/dns:v2beta1/ManagedZonesListResponse/kind: kind +/dns:v2beta1/ManagedZonesListResponse/managedZones: managed_zones +/dns:v2beta1/ManagedZonesListResponse/managedZones/managed_zone: managed_zone +/dns:v2beta1/ManagedZonesListResponse/nextPageToken: next_page_token +/dns:v2beta1/Operation: operation +/dns:v2beta1/Operation/dnsKeyContext: dns_key_context +/dns:v2beta1/Operation/id: id +/dns:v2beta1/Operation/kind: kind +/dns:v2beta1/Operation/startTime: start_time +/dns:v2beta1/Operation/status: status +/dns:v2beta1/Operation/type: type +/dns:v2beta1/Operation/user: user +/dns:v2beta1/Operation/zoneContext: zone_context +/dns:v2beta1/OperationDnsKeyContext: operation_dns_key_context +/dns:v2beta1/OperationDnsKeyContext/newValue: new_value +/dns:v2beta1/OperationDnsKeyContext/oldValue: old_value +/dns:v2beta1/OperationManagedZoneContext: operation_managed_zone_context +/dns:v2beta1/OperationManagedZoneContext/newValue: new_value +/dns:v2beta1/OperationManagedZoneContext/oldValue: old_value +/dns:v2beta1/Project: project +/dns:v2beta1/Project/id: id +/dns:v2beta1/Project/kind: kind +/dns:v2beta1/Project/number: number +/dns:v2beta1/Project/quota: quota +/dns:v2beta1/Quota: quota +/dns:v2beta1/Quota/dnsKeysPerManagedZone: dns_keys_per_managed_zone +/dns:v2beta1/Quota/kind: kind +/dns:v2beta1/Quota/managedZones: managed_zones +/dns:v2beta1/Quota/resourceRecordsPerRrset: resource_records_per_rrset +/dns:v2beta1/Quota/rrsetAdditionsPerChange: rrset_additions_per_change +/dns:v2beta1/Quota/rrsetDeletionsPerChange: rrset_deletions_per_change +/dns:v2beta1/Quota/rrsetsPerManagedZone: rrsets_per_managed_zone +/dns:v2beta1/Quota/totalRrdataSizePerChange: total_rrdata_size_per_change +/dns:v2beta1/Quota/whitelistedKeySpecs: whitelisted_key_specs +/dns:v2beta1/Quota/whitelistedKeySpecs/whitelisted_key_spec: whitelisted_key_spec +/dns:v2beta1/ResourceRecordSet: resource_record_set +/dns:v2beta1/ResourceRecordSet/kind: kind +/dns:v2beta1/ResourceRecordSet/name: name +/dns:v2beta1/ResourceRecordSet/rrdatas: rrdatas +/dns:v2beta1/ResourceRecordSet/rrdatas/rrdata: rrdata +/dns:v2beta1/ResourceRecordSet/signatureRrdatas: signature_rrdatas +/dns:v2beta1/ResourceRecordSet/signatureRrdatas/signature_rrdata: signature_rrdata +/dns:v2beta1/ResourceRecordSet/ttl: ttl +/dns:v2beta1/ResourceRecordSet/type: type +/dns:v2beta1/ResourceRecordSetsListResponse: resource_record_sets_list_response +/dns:v2beta1/ResourceRecordSetsListResponse/header: header +/dns:v2beta1/ResourceRecordSetsListResponse/kind: kind +/dns:v2beta1/ResourceRecordSetsListResponse/nextPageToken: next_page_token +/dns:v2beta1/ResourceRecordSetsListResponse/rrsets: rrsets +/dns:v2beta1/ResourceRecordSetsListResponse/rrsets/rrset: rrset +/dns:v2beta1/ResponseHeader: response_header +/dns:v2beta1/ResponseHeader/operationId: operation_id diff --git a/generated/google/apis/cloudresourcemanager_v1.rb b/generated/google/apis/cloudresourcemanager_v1.rb index 8df36df33..d7035b38a 100644 --- a/generated/google/apis/cloudresourcemanager_v1.rb +++ b/generated/google/apis/cloudresourcemanager_v1.rb @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/resource-manager module CloudresourcemanagerV1 VERSION = 'V1' - REVISION = '20170116' + REVISION = '20170118' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/cloudresourcemanager_v1beta1.rb b/generated/google/apis/cloudresourcemanager_v1beta1.rb index 509ede9ba..534172d99 100644 --- a/generated/google/apis/cloudresourcemanager_v1beta1.rb +++ b/generated/google/apis/cloudresourcemanager_v1beta1.rb @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/resource-manager module CloudresourcemanagerV1beta1 VERSION = 'V1beta1' - REVISION = '20170116' + REVISION = '20170118' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/dns_v2beta1.rb b/generated/google/apis/dns_v2beta1.rb new file mode 100644 index 000000000..fca9d8d0f --- /dev/null +++ b/generated/google/apis/dns_v2beta1.rb @@ -0,0 +1,43 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'google/apis/dns_v2beta1/service.rb' +require 'google/apis/dns_v2beta1/classes.rb' +require 'google/apis/dns_v2beta1/representations.rb' + +module Google + module Apis + # Google Cloud DNS API + # + # Configures and serves authoritative DNS records. + # + # @see https://developers.google.com/cloud-dns + module DnsV2beta1 + VERSION = 'V2beta1' + REVISION = '20170102' + + # View and manage your data across Google Cloud Platform services + AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' + + # View your data across Google Cloud Platform services + AUTH_CLOUD_PLATFORM_READ_ONLY = 'https://www.googleapis.com/auth/cloud-platform.read-only' + + # View your DNS records hosted by Google Cloud DNS + AUTH_NDEV_CLOUDDNS_READONLY = 'https://www.googleapis.com/auth/ndev.clouddns.readonly' + + # View and manage your DNS records hosted by Google Cloud DNS + AUTH_NDEV_CLOUDDNS_READWRITE = 'https://www.googleapis.com/auth/ndev.clouddns.readwrite' + end + end +end diff --git a/generated/google/apis/dns_v2beta1/classes.rb b/generated/google/apis/dns_v2beta1/classes.rb new file mode 100644 index 000000000..e33041e9f --- /dev/null +++ b/generated/google/apis/dns_v2beta1/classes.rb @@ -0,0 +1,915 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'date' +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module DnsV2beta1 + + # An atomic update to a collection of ResourceRecordSets. + class Change + include Google::Apis::Core::Hashable + + # Which ResourceRecordSets to add? + # Corresponds to the JSON property `additions` + # @return [Array] + attr_accessor :additions + + # Which ResourceRecordSets to remove? Must match existing data exactly. + # Corresponds to the JSON property `deletions` + # @return [Array] + attr_accessor :deletions + + # Unique identifier for the resource; defined by the server (output only). + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # If the DNS queries for the zone will be served. + # Corresponds to the JSON property `isServing` + # @return [Boolean] + attr_accessor :is_serving + alias_method :is_serving?, :is_serving + + # Identifies what kind of resource this is. Value: the fixed string "dns#change". + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # The time that this operation was started by the server (output only). This is + # in RFC3339 text format. + # Corresponds to the JSON property `startTime` + # @return [String] + attr_accessor :start_time + + # Status of the operation (output only). + # Corresponds to the JSON property `status` + # @return [String] + attr_accessor :status + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @additions = args[:additions] if args.key?(:additions) + @deletions = args[:deletions] if args.key?(:deletions) + @id = args[:id] if args.key?(:id) + @is_serving = args[:is_serving] if args.key?(:is_serving) + @kind = args[:kind] if args.key?(:kind) + @start_time = args[:start_time] if args.key?(:start_time) + @status = args[:status] if args.key?(:status) + end + end + + # The response to a request to enumerate Changes to a ResourceRecordSets + # collection. + class ChangesListResponse + include Google::Apis::Core::Hashable + + # The requested changes. + # Corresponds to the JSON property `changes` + # @return [Array] + attr_accessor :changes + + # Elements common to every response. + # Corresponds to the JSON property `header` + # @return [Google::Apis::DnsV2beta1::ResponseHeader] + attr_accessor :header + + # Type of resource. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # The presence of this field indicates that there exist more results following + # your last page of results in pagination order. To fetch them, make another + # list request using this value as your pagination token. + # In this way you can retrieve the complete contents of even very large + # collections one page at a time. However, if the contents of the collection + # change between the first and last paginated list request, the set of all + # elements returned will be an inconsistent view of the collection. There is no + # way to retrieve a "snapshot" of collections larger than the maximum page size. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @changes = args[:changes] if args.key?(:changes) + @header = args[:header] if args.key?(:header) + @kind = args[:kind] if args.key?(:kind) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # A DNSSEC key pair. + class DnsKey + include Google::Apis::Core::Hashable + + # String mnemonic specifying the DNSSEC algorithm of this key. Immutable after + # creation time. + # Corresponds to the JSON property `algorithm` + # @return [String] + attr_accessor :algorithm + + # The time that this resource was created in the control plane. This is in + # RFC3339 text format. Output only. + # Corresponds to the JSON property `creationTime` + # @return [String] + attr_accessor :creation_time + + # A mutable string of at most 1024 characters associated with this resource for + # the user's convenience. Has no effect on the resource's function. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # Cryptographic hashes of the DNSKEY resource record associated with this DnsKey. + # These digests are needed to construct a DS record that points at this DNS key. + # Output only. + # Corresponds to the JSON property `digests` + # @return [Array] + attr_accessor :digests + + # Unique identifier for the resource; defined by the server (output only). + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # Active keys will be used to sign subsequent changes to the ManagedZone. + # Inactive keys will still be present as DNSKEY Resource Records for the use of + # resolvers validating existing signatures. + # Corresponds to the JSON property `isActive` + # @return [Boolean] + attr_accessor :is_active + alias_method :is_active?, :is_active + + # Length of the key in bits. Specified at creation time then immutable. + # Corresponds to the JSON property `keyLength` + # @return [Fixnum] + attr_accessor :key_length + + # The key tag is a non-cryptographic hash of the a DNSKEY resource record + # associated with this DnsKey. The key tag can be used to identify a DNSKEY more + # quickly (but it is not a unique identifier). In particular, the key tag is + # used in a parent zone's DS record to point at the DNSKEY in this child + # ManagedZone. The key tag is a number in the range [0, 65535] and the algorithm + # to calculate it is specified in RFC4034 Appendix B. Output only. + # Corresponds to the JSON property `keyTag` + # @return [Fixnum] + attr_accessor :key_tag + + # Identifies what kind of resource this is. Value: the fixed string "dns#dnsKey". + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # Base64 encoded public half of this key. Output only. + # Corresponds to the JSON property `publicKey` + # @return [String] + attr_accessor :public_key + + # One of "KEY_SIGNING" or "ZONE_SIGNING". Keys of type KEY_SIGNING have the + # Secure Entry Point flag set and, when active, will be used to sign only + # resource record sets of type DNSKEY. Otherwise, the Secure Entry Point flag + # will be cleared and this key will be used to sign only resource record sets of + # other types. Immutable after creation time. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @algorithm = args[:algorithm] if args.key?(:algorithm) + @creation_time = args[:creation_time] if args.key?(:creation_time) + @description = args[:description] if args.key?(:description) + @digests = args[:digests] if args.key?(:digests) + @id = args[:id] if args.key?(:id) + @is_active = args[:is_active] if args.key?(:is_active) + @key_length = args[:key_length] if args.key?(:key_length) + @key_tag = args[:key_tag] if args.key?(:key_tag) + @kind = args[:kind] if args.key?(:kind) + @public_key = args[:public_key] if args.key?(:public_key) + @type = args[:type] if args.key?(:type) + end + end + + # + class DnsKeyDigest + include Google::Apis::Core::Hashable + + # The base-16 encoded bytes of this digest. Suitable for use in a DS resource + # record. + # Corresponds to the JSON property `digest` + # @return [String] + attr_accessor :digest + + # Specifies the algorithm used to calculate this digest. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @digest = args[:digest] if args.key?(:digest) + @type = args[:type] if args.key?(:type) + end + end + + # Parameters for DnsKey key generation. Used for generating initial keys for a + # new ManagedZone and as default when adding a new DnsKey. + class DnsKeySpec + include Google::Apis::Core::Hashable + + # String mnemonic specifying the DNSSEC algorithm of this key. + # Corresponds to the JSON property `algorithm` + # @return [String] + attr_accessor :algorithm + + # Length of the keys in bits. + # Corresponds to the JSON property `keyLength` + # @return [Fixnum] + attr_accessor :key_length + + # One of "KEY_SIGNING" or "ZONE_SIGNING". Keys of type KEY_SIGNING have the + # Secure Entry Point flag set and, when active, will be used to sign only + # resource record sets of type DNSKEY. Otherwise, the Secure Entry Point flag + # will be cleared and this key will be used to sign only resource record sets of + # other types. + # Corresponds to the JSON property `keyType` + # @return [String] + attr_accessor :key_type + + # Identifies what kind of resource this is. Value: the fixed string "dns# + # dnsKeySpec". + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @algorithm = args[:algorithm] if args.key?(:algorithm) + @key_length = args[:key_length] if args.key?(:key_length) + @key_type = args[:key_type] if args.key?(:key_type) + @kind = args[:kind] if args.key?(:kind) + end + end + + # The response to a request to enumerate DnsKeys in a ManagedZone. + class DnsKeysListResponse + include Google::Apis::Core::Hashable + + # The requested resources. + # Corresponds to the JSON property `dnsKeys` + # @return [Array] + attr_accessor :dns_keys + + # Elements common to every response. + # Corresponds to the JSON property `header` + # @return [Google::Apis::DnsV2beta1::ResponseHeader] + attr_accessor :header + + # Type of resource. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # The presence of this field indicates that there exist more results following + # your last page of results in pagination order. To fetch them, make another + # list request using this value as your pagination token. + # In this way you can retrieve the complete contents of even very large + # collections one page at a time. However, if the contents of the collection + # change between the first and last paginated list request, the set of all + # elements returned will be an inconsistent view of the collection. There is no + # way to retrieve a "snapshot" of collections larger than the maximum page size. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @dns_keys = args[:dns_keys] if args.key?(:dns_keys) + @header = args[:header] if args.key?(:header) + @kind = args[:kind] if args.key?(:kind) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # A zone is a subtree of the DNS namespace under one administrative + # responsibility. A ManagedZone is a resource that represents a DNS zone hosted + # by the Cloud DNS service. + class ManagedZone + include Google::Apis::Core::Hashable + + # The time that this resource was created on the server. This is in RFC3339 text + # format. Output only. + # Corresponds to the JSON property `creationTime` + # @return [String] + attr_accessor :creation_time + + # A mutable string of at most 1024 characters associated with this resource for + # the user's convenience. Has no effect on the managed zone's function. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # The DNS name of this managed zone, for instance "example.com.". + # Corresponds to the JSON property `dnsName` + # @return [String] + attr_accessor :dns_name + + # DNSSEC configuration. + # Corresponds to the JSON property `dnssecConfig` + # @return [Google::Apis::DnsV2beta1::ManagedZoneDnsSecConfig] + attr_accessor :dnssec_config + + # Unique identifier for the resource; defined by the server (output only) + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # Identifies what kind of resource this is. Value: the fixed string "dns# + # managedZone". + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # User assigned name for this resource. Must be unique within the project. The + # name must be 1-63 characters long, must begin with a letter, end with a letter + # or digit, and only contain lowercase letters, digits or dashes. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Optionally specifies the NameServerSet for this ManagedZone. A NameServerSet + # is a set of DNS name servers that all host the same ManagedZones. Most users + # will leave this field unset. + # Corresponds to the JSON property `nameServerSet` + # @return [String] + attr_accessor :name_server_set + + # Delegate your managed_zone to these virtual name servers; defined by the + # server (output only) + # Corresponds to the JSON property `nameServers` + # @return [Array] + attr_accessor :name_servers + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @creation_time = args[:creation_time] if args.key?(:creation_time) + @description = args[:description] if args.key?(:description) + @dns_name = args[:dns_name] if args.key?(:dns_name) + @dnssec_config = args[:dnssec_config] if args.key?(:dnssec_config) + @id = args[:id] if args.key?(:id) + @kind = args[:kind] if args.key?(:kind) + @name = args[:name] if args.key?(:name) + @name_server_set = args[:name_server_set] if args.key?(:name_server_set) + @name_servers = args[:name_servers] if args.key?(:name_servers) + end + end + + # + class ManagedZoneDnsSecConfig + include Google::Apis::Core::Hashable + + # Specifies parameters that will be used for generating initial DnsKeys for this + # ManagedZone. Output only while state is not OFF. + # Corresponds to the JSON property `defaultKeySpecs` + # @return [Array] + attr_accessor :default_key_specs + + # Identifies what kind of resource this is. Value: the fixed string "dns# + # managedZoneDnsSecConfig". + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # Specifies the mechanism used to provide authenticated denial-of-existence + # responses. Output only while state is not OFF. + # Corresponds to the JSON property `nonExistence` + # @return [String] + attr_accessor :non_existence + + # Specifies whether DNSSEC is enabled, and what mode it is in. + # Corresponds to the JSON property `state` + # @return [String] + attr_accessor :state + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @default_key_specs = args[:default_key_specs] if args.key?(:default_key_specs) + @kind = args[:kind] if args.key?(:kind) + @non_existence = args[:non_existence] if args.key?(:non_existence) + @state = args[:state] if args.key?(:state) + end + end + + # + class ManagedZoneOperationsListResponse + include Google::Apis::Core::Hashable + + # Elements common to every response. + # Corresponds to the JSON property `header` + # @return [Google::Apis::DnsV2beta1::ResponseHeader] + attr_accessor :header + + # Type of resource. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # The presence of this field indicates that there exist more results following + # your last page of results in pagination order. To fetch them, make another + # list request using this value as your page token. + # In this way you can retrieve the complete contents of even very large + # collections one page at a time. However, if the contents of the collection + # change between the first and last paginated list request, the set of all + # elements returned will be an inconsistent view of the collection. There is no + # way to retrieve a consistent snapshot of a collection larger than the maximum + # page size. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The operation resources. + # Corresponds to the JSON property `operations` + # @return [Array] + attr_accessor :operations + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @header = args[:header] if args.key?(:header) + @kind = args[:kind] if args.key?(:kind) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @operations = args[:operations] if args.key?(:operations) + end + end + + # + class ManagedZonesDeleteResponse + include Google::Apis::Core::Hashable + + # Elements common to every response. + # Corresponds to the JSON property `header` + # @return [Google::Apis::DnsV2beta1::ResponseHeader] + attr_accessor :header + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @header = args[:header] if args.key?(:header) + end + end + + # + class ManagedZonesListResponse + include Google::Apis::Core::Hashable + + # Elements common to every response. + # Corresponds to the JSON property `header` + # @return [Google::Apis::DnsV2beta1::ResponseHeader] + attr_accessor :header + + # Type of resource. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # The managed zone resources. + # Corresponds to the JSON property `managedZones` + # @return [Array] + attr_accessor :managed_zones + + # The presence of this field indicates that there exist more results following + # your last page of results in pagination order. To fetch them, make another + # list request using this value as your page token. + # In this way you can retrieve the complete contents of even very large + # collections one page at a time. However, if the contents of the collection + # change between the first and last paginated list request, the set of all + # elements returned will be an inconsistent view of the collection. There is no + # way to retrieve a consistent snapshot of a collection larger than the maximum + # page size. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @header = args[:header] if args.key?(:header) + @kind = args[:kind] if args.key?(:kind) + @managed_zones = args[:managed_zones] if args.key?(:managed_zones) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # An operation represents a successful mutation performed on a Cloud DNS + # resource. Operations provide: - An audit log of server resource mutations. - A + # way to recover/retry API calls in the case where the response is never + # received by the caller. Use the caller specified client_operation_id. + class Operation + include Google::Apis::Core::Hashable + + # Only populated if the operation targeted a DnsKey (output only). + # Corresponds to the JSON property `dnsKeyContext` + # @return [Google::Apis::DnsV2beta1::OperationDnsKeyContext] + attr_accessor :dns_key_context + + # Unique identifier for the resource. This is the client_operation_id if the + # client specified it when the mutation was initiated, otherwise, it is + # generated by the server. The name must be 1-63 characters long and match the + # regular expression [-a-z0-9]? (output only) + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # Identifies what kind of resource this is. Value: the fixed string "dns# + # operation". + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # The time that this operation was started by the server. This is in RFC3339 + # text format (output only). + # Corresponds to the JSON property `startTime` + # @return [String] + attr_accessor :start_time + + # Status of the operation. Can be one of the following: "PENDING" or "DONE" ( + # output only). + # Corresponds to the JSON property `status` + # @return [String] + attr_accessor :status + + # Type of the operation. Operations include insert, update, and delete (output + # only). + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # User who requested the operation, for example: user@example.com. cloud-dns- + # system for operations automatically done by the system. (output only) + # Corresponds to the JSON property `user` + # @return [String] + attr_accessor :user + + # Only populated if the operation targeted a ManagedZone (output only). + # Corresponds to the JSON property `zoneContext` + # @return [Google::Apis::DnsV2beta1::OperationManagedZoneContext] + attr_accessor :zone_context + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @dns_key_context = args[:dns_key_context] if args.key?(:dns_key_context) + @id = args[:id] if args.key?(:id) + @kind = args[:kind] if args.key?(:kind) + @start_time = args[:start_time] if args.key?(:start_time) + @status = args[:status] if args.key?(:status) + @type = args[:type] if args.key?(:type) + @user = args[:user] if args.key?(:user) + @zone_context = args[:zone_context] if args.key?(:zone_context) + end + end + + # + class OperationDnsKeyContext + include Google::Apis::Core::Hashable + + # A DNSSEC key pair. + # Corresponds to the JSON property `newValue` + # @return [Google::Apis::DnsV2beta1::DnsKey] + attr_accessor :new_value + + # A DNSSEC key pair. + # Corresponds to the JSON property `oldValue` + # @return [Google::Apis::DnsV2beta1::DnsKey] + attr_accessor :old_value + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @new_value = args[:new_value] if args.key?(:new_value) + @old_value = args[:old_value] if args.key?(:old_value) + end + end + + # + class OperationManagedZoneContext + include Google::Apis::Core::Hashable + + # A zone is a subtree of the DNS namespace under one administrative + # responsibility. A ManagedZone is a resource that represents a DNS zone hosted + # by the Cloud DNS service. + # Corresponds to the JSON property `newValue` + # @return [Google::Apis::DnsV2beta1::ManagedZone] + attr_accessor :new_value + + # A zone is a subtree of the DNS namespace under one administrative + # responsibility. A ManagedZone is a resource that represents a DNS zone hosted + # by the Cloud DNS service. + # Corresponds to the JSON property `oldValue` + # @return [Google::Apis::DnsV2beta1::ManagedZone] + attr_accessor :old_value + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @new_value = args[:new_value] if args.key?(:new_value) + @old_value = args[:old_value] if args.key?(:old_value) + end + end + + # A project resource. The project is a top level container for resources + # including Cloud DNS ManagedZones. Projects can be created only in the APIs + # console. + class Project + include Google::Apis::Core::Hashable + + # User assigned unique identifier for the resource (output only). + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # Identifies what kind of resource this is. Value: the fixed string "dns#project" + # . + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # Unique numeric identifier for the resource; defined by the server (output only) + # . + # Corresponds to the JSON property `number` + # @return [String] + attr_accessor :number + + # Limits associated with a Project. + # Corresponds to the JSON property `quota` + # @return [Google::Apis::DnsV2beta1::Quota] + attr_accessor :quota + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @id = args[:id] if args.key?(:id) + @kind = args[:kind] if args.key?(:kind) + @number = args[:number] if args.key?(:number) + @quota = args[:quota] if args.key?(:quota) + end + end + + # Limits associated with a Project. + class Quota + include Google::Apis::Core::Hashable + + # Maximum allowed number of DnsKeys per ManagedZone. + # Corresponds to the JSON property `dnsKeysPerManagedZone` + # @return [Fixnum] + attr_accessor :dns_keys_per_managed_zone + + # Identifies what kind of resource this is. Value: the fixed string "dns#quota". + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # Maximum allowed number of managed zones in the project. + # Corresponds to the JSON property `managedZones` + # @return [Fixnum] + attr_accessor :managed_zones + + # Maximum allowed number of ResourceRecords per ResourceRecordSet. + # Corresponds to the JSON property `resourceRecordsPerRrset` + # @return [Fixnum] + attr_accessor :resource_records_per_rrset + + # Maximum allowed number of ResourceRecordSets to add per ChangesCreateRequest. + # Corresponds to the JSON property `rrsetAdditionsPerChange` + # @return [Fixnum] + attr_accessor :rrset_additions_per_change + + # Maximum allowed number of ResourceRecordSets to delete per + # ChangesCreateRequest. + # Corresponds to the JSON property `rrsetDeletionsPerChange` + # @return [Fixnum] + attr_accessor :rrset_deletions_per_change + + # Maximum allowed number of ResourceRecordSets per zone in the project. + # Corresponds to the JSON property `rrsetsPerManagedZone` + # @return [Fixnum] + attr_accessor :rrsets_per_managed_zone + + # Maximum allowed size for total rrdata in one ChangesCreateRequest in bytes. + # Corresponds to the JSON property `totalRrdataSizePerChange` + # @return [Fixnum] + attr_accessor :total_rrdata_size_per_change + + # DNSSEC algorithm and key length types that can be used for DnsKeys. + # Corresponds to the JSON property `whitelistedKeySpecs` + # @return [Array] + attr_accessor :whitelisted_key_specs + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @dns_keys_per_managed_zone = args[:dns_keys_per_managed_zone] if args.key?(:dns_keys_per_managed_zone) + @kind = args[:kind] if args.key?(:kind) + @managed_zones = args[:managed_zones] if args.key?(:managed_zones) + @resource_records_per_rrset = args[:resource_records_per_rrset] if args.key?(:resource_records_per_rrset) + @rrset_additions_per_change = args[:rrset_additions_per_change] if args.key?(:rrset_additions_per_change) + @rrset_deletions_per_change = args[:rrset_deletions_per_change] if args.key?(:rrset_deletions_per_change) + @rrsets_per_managed_zone = args[:rrsets_per_managed_zone] if args.key?(:rrsets_per_managed_zone) + @total_rrdata_size_per_change = args[:total_rrdata_size_per_change] if args.key?(:total_rrdata_size_per_change) + @whitelisted_key_specs = args[:whitelisted_key_specs] if args.key?(:whitelisted_key_specs) + end + end + + # A unit of data that will be returned by the DNS servers. + class ResourceRecordSet + include Google::Apis::Core::Hashable + + # Identifies what kind of resource this is. Value: the fixed string "dns# + # resourceRecordSet". + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # For example, www.example.com. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # As defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1). + # Corresponds to the JSON property `rrdatas` + # @return [Array] + attr_accessor :rrdatas + + # As defined in RFC 4034 (section 3.2). + # Corresponds to the JSON property `signatureRrdatas` + # @return [Array] + attr_accessor :signature_rrdatas + + # Number of seconds that this ResourceRecordSet can be cached by resolvers. + # Corresponds to the JSON property `ttl` + # @return [Fixnum] + attr_accessor :ttl + + # The identifier of a supported record type, for example, A, AAAA, MX, TXT, and + # so on. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @kind = args[:kind] if args.key?(:kind) + @name = args[:name] if args.key?(:name) + @rrdatas = args[:rrdatas] if args.key?(:rrdatas) + @signature_rrdatas = args[:signature_rrdatas] if args.key?(:signature_rrdatas) + @ttl = args[:ttl] if args.key?(:ttl) + @type = args[:type] if args.key?(:type) + end + end + + # + class ResourceRecordSetsListResponse + include Google::Apis::Core::Hashable + + # Elements common to every response. + # Corresponds to the JSON property `header` + # @return [Google::Apis::DnsV2beta1::ResponseHeader] + attr_accessor :header + + # Type of resource. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # The presence of this field indicates that there exist more results following + # your last page of results in pagination order. To fetch them, make another + # list request using this value as your pagination token. + # In this way you can retrieve the complete contents of even very large + # collections one page at a time. However, if the contents of the collection + # change between the first and last paginated list request, the set of all + # elements returned will be an inconsistent view of the collection. There is no + # way to retrieve a consistent snapshot of a collection larger than the maximum + # page size. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The resource record set resources. + # Corresponds to the JSON property `rrsets` + # @return [Array] + attr_accessor :rrsets + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @header = args[:header] if args.key?(:header) + @kind = args[:kind] if args.key?(:kind) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @rrsets = args[:rrsets] if args.key?(:rrsets) + end + end + + # Elements common to every response. + class ResponseHeader + include Google::Apis::Core::Hashable + + # For mutating operation requests that completed successfully. This is the + # client_operation_id if the client specified it, otherwise it is generated by + # the server (output only). + # Corresponds to the JSON property `operationId` + # @return [String] + attr_accessor :operation_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @operation_id = args[:operation_id] if args.key?(:operation_id) + end + end + end + end +end diff --git a/generated/google/apis/dns_v2beta1/representations.rb b/generated/google/apis/dns_v2beta1/representations.rb new file mode 100644 index 000000000..c05a0f26b --- /dev/null +++ b/generated/google/apis/dns_v2beta1/representations.rb @@ -0,0 +1,368 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'date' +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module DnsV2beta1 + + class Change + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ChangesListResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DnsKey + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DnsKeyDigest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DnsKeySpec + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DnsKeysListResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ManagedZone + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ManagedZoneDnsSecConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ManagedZoneOperationsListResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ManagedZonesDeleteResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ManagedZonesListResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Operation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class OperationDnsKeyContext + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class OperationManagedZoneContext + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Project + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Quota + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ResourceRecordSet + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ResourceRecordSetsListResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ResponseHeader + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Change + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :additions, as: 'additions', class: Google::Apis::DnsV2beta1::ResourceRecordSet, decorator: Google::Apis::DnsV2beta1::ResourceRecordSet::Representation + + collection :deletions, as: 'deletions', class: Google::Apis::DnsV2beta1::ResourceRecordSet, decorator: Google::Apis::DnsV2beta1::ResourceRecordSet::Representation + + property :id, as: 'id' + property :is_serving, as: 'isServing' + property :kind, as: 'kind' + property :start_time, as: 'startTime' + property :status, as: 'status' + end + end + + class ChangesListResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :changes, as: 'changes', class: Google::Apis::DnsV2beta1::Change, decorator: Google::Apis::DnsV2beta1::Change::Representation + + property :header, as: 'header', class: Google::Apis::DnsV2beta1::ResponseHeader, decorator: Google::Apis::DnsV2beta1::ResponseHeader::Representation + + property :kind, as: 'kind' + property :next_page_token, as: 'nextPageToken' + end + end + + class DnsKey + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :algorithm, as: 'algorithm' + property :creation_time, as: 'creationTime' + property :description, as: 'description' + collection :digests, as: 'digests', class: Google::Apis::DnsV2beta1::DnsKeyDigest, decorator: Google::Apis::DnsV2beta1::DnsKeyDigest::Representation + + property :id, as: 'id' + property :is_active, as: 'isActive' + property :key_length, as: 'keyLength' + property :key_tag, as: 'keyTag' + property :kind, as: 'kind' + property :public_key, as: 'publicKey' + property :type, as: 'type' + end + end + + class DnsKeyDigest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :digest, as: 'digest' + property :type, as: 'type' + end + end + + class DnsKeySpec + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :algorithm, as: 'algorithm' + property :key_length, as: 'keyLength' + property :key_type, as: 'keyType' + property :kind, as: 'kind' + end + end + + class DnsKeysListResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :dns_keys, as: 'dnsKeys', class: Google::Apis::DnsV2beta1::DnsKey, decorator: Google::Apis::DnsV2beta1::DnsKey::Representation + + property :header, as: 'header', class: Google::Apis::DnsV2beta1::ResponseHeader, decorator: Google::Apis::DnsV2beta1::ResponseHeader::Representation + + property :kind, as: 'kind' + property :next_page_token, as: 'nextPageToken' + end + end + + class ManagedZone + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :creation_time, as: 'creationTime' + property :description, as: 'description' + property :dns_name, as: 'dnsName' + property :dnssec_config, as: 'dnssecConfig', class: Google::Apis::DnsV2beta1::ManagedZoneDnsSecConfig, decorator: Google::Apis::DnsV2beta1::ManagedZoneDnsSecConfig::Representation + + property :id, as: 'id' + property :kind, as: 'kind' + property :name, as: 'name' + property :name_server_set, as: 'nameServerSet' + collection :name_servers, as: 'nameServers' + end + end + + class ManagedZoneDnsSecConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :default_key_specs, as: 'defaultKeySpecs', class: Google::Apis::DnsV2beta1::DnsKeySpec, decorator: Google::Apis::DnsV2beta1::DnsKeySpec::Representation + + property :kind, as: 'kind' + property :non_existence, as: 'nonExistence' + property :state, as: 'state' + end + end + + class ManagedZoneOperationsListResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :header, as: 'header', class: Google::Apis::DnsV2beta1::ResponseHeader, decorator: Google::Apis::DnsV2beta1::ResponseHeader::Representation + + property :kind, as: 'kind' + property :next_page_token, as: 'nextPageToken' + collection :operations, as: 'operations', class: Google::Apis::DnsV2beta1::Operation, decorator: Google::Apis::DnsV2beta1::Operation::Representation + + end + end + + class ManagedZonesDeleteResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :header, as: 'header', class: Google::Apis::DnsV2beta1::ResponseHeader, decorator: Google::Apis::DnsV2beta1::ResponseHeader::Representation + + end + end + + class ManagedZonesListResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :header, as: 'header', class: Google::Apis::DnsV2beta1::ResponseHeader, decorator: Google::Apis::DnsV2beta1::ResponseHeader::Representation + + property :kind, as: 'kind' + collection :managed_zones, as: 'managedZones', class: Google::Apis::DnsV2beta1::ManagedZone, decorator: Google::Apis::DnsV2beta1::ManagedZone::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class Operation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :dns_key_context, as: 'dnsKeyContext', class: Google::Apis::DnsV2beta1::OperationDnsKeyContext, decorator: Google::Apis::DnsV2beta1::OperationDnsKeyContext::Representation + + property :id, as: 'id' + property :kind, as: 'kind' + property :start_time, as: 'startTime' + property :status, as: 'status' + property :type, as: 'type' + property :user, as: 'user' + property :zone_context, as: 'zoneContext', class: Google::Apis::DnsV2beta1::OperationManagedZoneContext, decorator: Google::Apis::DnsV2beta1::OperationManagedZoneContext::Representation + + end + end + + class OperationDnsKeyContext + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :new_value, as: 'newValue', class: Google::Apis::DnsV2beta1::DnsKey, decorator: Google::Apis::DnsV2beta1::DnsKey::Representation + + property :old_value, as: 'oldValue', class: Google::Apis::DnsV2beta1::DnsKey, decorator: Google::Apis::DnsV2beta1::DnsKey::Representation + + end + end + + class OperationManagedZoneContext + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :new_value, as: 'newValue', class: Google::Apis::DnsV2beta1::ManagedZone, decorator: Google::Apis::DnsV2beta1::ManagedZone::Representation + + property :old_value, as: 'oldValue', class: Google::Apis::DnsV2beta1::ManagedZone, decorator: Google::Apis::DnsV2beta1::ManagedZone::Representation + + end + end + + class Project + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :id, as: 'id' + property :kind, as: 'kind' + property :number, as: 'number' + property :quota, as: 'quota', class: Google::Apis::DnsV2beta1::Quota, decorator: Google::Apis::DnsV2beta1::Quota::Representation + + end + end + + class Quota + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :dns_keys_per_managed_zone, as: 'dnsKeysPerManagedZone' + property :kind, as: 'kind' + property :managed_zones, as: 'managedZones' + property :resource_records_per_rrset, as: 'resourceRecordsPerRrset' + property :rrset_additions_per_change, as: 'rrsetAdditionsPerChange' + property :rrset_deletions_per_change, as: 'rrsetDeletionsPerChange' + property :rrsets_per_managed_zone, as: 'rrsetsPerManagedZone' + property :total_rrdata_size_per_change, as: 'totalRrdataSizePerChange' + collection :whitelisted_key_specs, as: 'whitelistedKeySpecs', class: Google::Apis::DnsV2beta1::DnsKeySpec, decorator: Google::Apis::DnsV2beta1::DnsKeySpec::Representation + + end + end + + class ResourceRecordSet + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :kind, as: 'kind' + property :name, as: 'name' + collection :rrdatas, as: 'rrdatas' + collection :signature_rrdatas, as: 'signatureRrdatas' + property :ttl, as: 'ttl' + property :type, as: 'type' + end + end + + class ResourceRecordSetsListResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :header, as: 'header', class: Google::Apis::DnsV2beta1::ResponseHeader, decorator: Google::Apis::DnsV2beta1::ResponseHeader::Representation + + property :kind, as: 'kind' + property :next_page_token, as: 'nextPageToken' + collection :rrsets, as: 'rrsets', class: Google::Apis::DnsV2beta1::ResourceRecordSet, decorator: Google::Apis::DnsV2beta1::ResourceRecordSet::Representation + + end + end + + class ResponseHeader + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :operation_id, as: 'operationId' + end + end + end + end +end diff --git a/generated/google/apis/dns_v2beta1/service.rb b/generated/google/apis/dns_v2beta1/service.rb new file mode 100644 index 000000000..7dd58f166 --- /dev/null +++ b/generated/google/apis/dns_v2beta1/service.rb @@ -0,0 +1,768 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module DnsV2beta1 + # Google Cloud DNS API + # + # Configures and serves authoritative DNS records. + # + # @example + # require 'google/apis/dns_v2beta1' + # + # Dns = Google::Apis::DnsV2beta1 # Alias the module + # service = Dns::DnsService.new + # + # @see https://developers.google.com/cloud-dns + class DnsService < Google::Apis::Core::BaseService + # @return [String] + # API key. Your API key identifies your project and provides you with API access, + # quota, and reports. Required unless you provide an OAuth 2.0 token. + attr_accessor :key + + # @return [String] + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # Overrides userIp if both are provided. + attr_accessor :quota_user + + # @return [String] + # IP address of the site where the request originates. Use this if you want to + # enforce per-user limits. + attr_accessor :user_ip + + def initialize + super('https://www.googleapis.com/', 'dns/v2beta1/projects/') + end + + # Atomically update the ResourceRecordSet collection. + # @param [String] project + # Identifies the project addressed by this request. + # @param [String] managed_zone + # Identifies the managed zone addressed by this request. Can be the managed zone + # name or id. + # @param [Google::Apis::DnsV2beta1::Change] change_object + # @param [String] client_operation_id + # For mutating operation requests only. An optional identifier specified by the + # client. Must be unique for operation resources in the Operations collection. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # Overrides userIp if both are provided. + # @param [String] user_ip + # IP address of the site where the request originates. Use this if you want to + # enforce per-user limits. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::DnsV2beta1::Change] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DnsV2beta1::Change] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_change(project, managed_zone, change_object = nil, client_operation_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, '{project}/managedZones/{managedZone}/changes', options) + command.request_representation = Google::Apis::DnsV2beta1::Change::Representation + command.request_object = change_object + command.response_representation = Google::Apis::DnsV2beta1::Change::Representation + command.response_class = Google::Apis::DnsV2beta1::Change + command.params['project'] = project unless project.nil? + command.params['managedZone'] = managed_zone unless managed_zone.nil? + command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + + # Fetch the representation of an existing Change. + # @param [String] project + # Identifies the project addressed by this request. + # @param [String] managed_zone + # Identifies the managed zone addressed by this request. Can be the managed zone + # name or id. + # @param [String] change_id + # The identifier of the requested change, from a previous + # ResourceRecordSetsChangeResponse. + # @param [String] client_operation_id + # For mutating operation requests only. An optional identifier specified by the + # client. Must be unique for operation resources in the Operations collection. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # Overrides userIp if both are provided. + # @param [String] user_ip + # IP address of the site where the request originates. Use this if you want to + # enforce per-user limits. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::DnsV2beta1::Change] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DnsV2beta1::Change] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_change(project, managed_zone, change_id, client_operation_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:get, '{project}/managedZones/{managedZone}/changes/{changeId}', options) + command.response_representation = Google::Apis::DnsV2beta1::Change::Representation + command.response_class = Google::Apis::DnsV2beta1::Change + command.params['project'] = project unless project.nil? + command.params['managedZone'] = managed_zone unless managed_zone.nil? + command.params['changeId'] = change_id unless change_id.nil? + command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + + # Enumerate Changes to a ResourceRecordSet collection. + # @param [String] project + # Identifies the project addressed by this request. + # @param [String] managed_zone + # Identifies the managed zone addressed by this request. Can be the managed zone + # name or id. + # @param [Fixnum] max_results + # Optional. Maximum number of results to be returned. If unspecified, the server + # will decide how many results to return. + # @param [String] page_token + # Optional. A tag returned by a previous list request that was truncated. Use + # this parameter to continue a previous list request. + # @param [String] sort_by + # Sorting criterion. The only supported value is change sequence. + # @param [String] sort_order + # Sorting order direction: 'ascending' or 'descending'. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # Overrides userIp if both are provided. + # @param [String] user_ip + # IP address of the site where the request originates. Use this if you want to + # enforce per-user limits. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::DnsV2beta1::ChangesListResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DnsV2beta1::ChangesListResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_changes(project, managed_zone, max_results: nil, page_token: nil, sort_by: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:get, '{project}/managedZones/{managedZone}/changes', options) + command.response_representation = Google::Apis::DnsV2beta1::ChangesListResponse::Representation + command.response_class = Google::Apis::DnsV2beta1::ChangesListResponse + command.params['project'] = project unless project.nil? + command.params['managedZone'] = managed_zone unless managed_zone.nil? + command.query['maxResults'] = max_results unless max_results.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['sortBy'] = sort_by unless sort_by.nil? + command.query['sortOrder'] = sort_order unless sort_order.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + + # Fetch the representation of an existing DnsKey. + # @param [String] project + # Identifies the project addressed by this request. + # @param [String] managed_zone + # Identifies the managed zone addressed by this request. Can be the managed zone + # name or id. + # @param [String] dns_key_id + # The identifier of the requested DnsKey. + # @param [String] client_operation_id + # For mutating operation requests only. An optional identifier specified by the + # client. Must be unique for operation resources in the Operations collection. + # @param [String] digest_type + # An optional comma-separated list of digest types to compute and display for + # key signing keys. If omitted, the recommended digest type will be computed and + # displayed. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # Overrides userIp if both are provided. + # @param [String] user_ip + # IP address of the site where the request originates. Use this if you want to + # enforce per-user limits. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::DnsV2beta1::DnsKey] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DnsV2beta1::DnsKey] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_dns_key(project, managed_zone, dns_key_id, client_operation_id: nil, digest_type: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:get, '{project}/managedZones/{managedZone}/dnsKeys/{dnsKeyId}', options) + command.response_representation = Google::Apis::DnsV2beta1::DnsKey::Representation + command.response_class = Google::Apis::DnsV2beta1::DnsKey + command.params['project'] = project unless project.nil? + command.params['managedZone'] = managed_zone unless managed_zone.nil? + command.params['dnsKeyId'] = dns_key_id unless dns_key_id.nil? + command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil? + command.query['digestType'] = digest_type unless digest_type.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + + # Enumerate DnsKeys to a ResourceRecordSet collection. + # @param [String] project + # Identifies the project addressed by this request. + # @param [String] managed_zone + # Identifies the managed zone addressed by this request. Can be the managed zone + # name or id. + # @param [String] digest_type + # An optional comma-separated list of digest types to compute and display for + # key signing keys. If omitted, the recommended digest type will be computed and + # displayed. + # @param [Fixnum] max_results + # Optional. Maximum number of results to be returned. If unspecified, the server + # will decide how many results to return. + # @param [String] page_token + # Optional. A tag returned by a previous list request that was truncated. Use + # this parameter to continue a previous list request. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # Overrides userIp if both are provided. + # @param [String] user_ip + # IP address of the site where the request originates. Use this if you want to + # enforce per-user limits. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::DnsV2beta1::DnsKeysListResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DnsV2beta1::DnsKeysListResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_dns_keys(project, managed_zone, digest_type: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:get, '{project}/managedZones/{managedZone}/dnsKeys', options) + command.response_representation = Google::Apis::DnsV2beta1::DnsKeysListResponse::Representation + command.response_class = Google::Apis::DnsV2beta1::DnsKeysListResponse + command.params['project'] = project unless project.nil? + command.params['managedZone'] = managed_zone unless managed_zone.nil? + command.query['digestType'] = digest_type unless digest_type.nil? + command.query['maxResults'] = max_results unless max_results.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + + # Fetch the representation of an existing Operation. + # @param [String] project + # Identifies the project addressed by this request. + # @param [String] managed_zone + # Identifies the managed zone addressed by this request. + # @param [String] operation + # Identifies the operation addressed by this request. + # @param [String] client_operation_id + # For mutating operation requests only. An optional identifier specified by the + # client. Must be unique for operation resources in the Operations collection. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # Overrides userIp if both are provided. + # @param [String] user_ip + # IP address of the site where the request originates. Use this if you want to + # enforce per-user limits. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::DnsV2beta1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DnsV2beta1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_managed_zone_operation(project, managed_zone, operation, client_operation_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:get, '{project}/managedZones/{managedZone}/operations/{operation}', options) + command.response_representation = Google::Apis::DnsV2beta1::Operation::Representation + command.response_class = Google::Apis::DnsV2beta1::Operation + command.params['project'] = project unless project.nil? + command.params['managedZone'] = managed_zone unless managed_zone.nil? + command.params['operation'] = operation unless operation.nil? + command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + + # Enumerate Operations for the given ManagedZone. + # @param [String] project + # Identifies the project addressed by this request. + # @param [String] managed_zone + # Identifies the managed zone addressed by this request. + # @param [Fixnum] max_results + # Optional. Maximum number of results to be returned. If unspecified, the server + # will decide how many results to return. + # @param [String] page_token + # Optional. A tag returned by a previous list request that was truncated. Use + # this parameter to continue a previous list request. + # @param [String] sort_by + # Sorting criterion. The only supported values are START_TIME and ID. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # Overrides userIp if both are provided. + # @param [String] user_ip + # IP address of the site where the request originates. Use this if you want to + # enforce per-user limits. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::DnsV2beta1::ManagedZoneOperationsListResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DnsV2beta1::ManagedZoneOperationsListResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_managed_zone_operations(project, managed_zone, max_results: nil, page_token: nil, sort_by: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:get, '{project}/managedZones/{managedZone}/operations', options) + command.response_representation = Google::Apis::DnsV2beta1::ManagedZoneOperationsListResponse::Representation + command.response_class = Google::Apis::DnsV2beta1::ManagedZoneOperationsListResponse + command.params['project'] = project unless project.nil? + command.params['managedZone'] = managed_zone unless managed_zone.nil? + command.query['maxResults'] = max_results unless max_results.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['sortBy'] = sort_by unless sort_by.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + + # Create a new ManagedZone. + # @param [String] project + # Identifies the project addressed by this request. + # @param [Google::Apis::DnsV2beta1::ManagedZone] managed_zone_object + # @param [String] client_operation_id + # For mutating operation requests only. An optional identifier specified by the + # client. Must be unique for operation resources in the Operations collection. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # Overrides userIp if both are provided. + # @param [String] user_ip + # IP address of the site where the request originates. Use this if you want to + # enforce per-user limits. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::DnsV2beta1::ManagedZone] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DnsV2beta1::ManagedZone] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_managed_zone(project, managed_zone_object = nil, client_operation_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, '{project}/managedZones', options) + command.request_representation = Google::Apis::DnsV2beta1::ManagedZone::Representation + command.request_object = managed_zone_object + command.response_representation = Google::Apis::DnsV2beta1::ManagedZone::Representation + command.response_class = Google::Apis::DnsV2beta1::ManagedZone + command.params['project'] = project unless project.nil? + command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + + # Delete a previously created ManagedZone. + # @param [String] project + # Identifies the project addressed by this request. + # @param [String] managed_zone + # Identifies the managed zone addressed by this request. Can be the managed zone + # name or id. + # @param [String] client_operation_id + # For mutating operation requests only. An optional identifier specified by the + # client. Must be unique for operation resources in the Operations collection. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # Overrides userIp if both are provided. + # @param [String] user_ip + # IP address of the site where the request originates. Use this if you want to + # enforce per-user limits. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::DnsV2beta1::ManagedZonesDeleteResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DnsV2beta1::ManagedZonesDeleteResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_managed_zone(project, managed_zone, client_operation_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:delete, '{project}/managedZones/{managedZone}', options) + command.response_representation = Google::Apis::DnsV2beta1::ManagedZonesDeleteResponse::Representation + command.response_class = Google::Apis::DnsV2beta1::ManagedZonesDeleteResponse + command.params['project'] = project unless project.nil? + command.params['managedZone'] = managed_zone unless managed_zone.nil? + command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + + # Fetch the representation of an existing ManagedZone. + # @param [String] project + # Identifies the project addressed by this request. + # @param [String] managed_zone + # Identifies the managed zone addressed by this request. Can be the managed zone + # name or id. + # @param [String] client_operation_id + # For mutating operation requests only. An optional identifier specified by the + # client. Must be unique for operation resources in the Operations collection. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # Overrides userIp if both are provided. + # @param [String] user_ip + # IP address of the site where the request originates. Use this if you want to + # enforce per-user limits. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::DnsV2beta1::ManagedZone] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DnsV2beta1::ManagedZone] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_managed_zone(project, managed_zone, client_operation_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:get, '{project}/managedZones/{managedZone}', options) + command.response_representation = Google::Apis::DnsV2beta1::ManagedZone::Representation + command.response_class = Google::Apis::DnsV2beta1::ManagedZone + command.params['project'] = project unless project.nil? + command.params['managedZone'] = managed_zone unless managed_zone.nil? + command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + + # Enumerate ManagedZones that have been created but not yet deleted. + # @param [String] project + # Identifies the project addressed by this request. + # @param [String] dns_name + # Restricts the list to return only zones with this domain name. + # @param [Fixnum] max_results + # Optional. Maximum number of results to be returned. If unspecified, the server + # will decide how many results to return. + # @param [String] page_token + # Optional. A tag returned by a previous list request that was truncated. Use + # this parameter to continue a previous list request. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # Overrides userIp if both are provided. + # @param [String] user_ip + # IP address of the site where the request originates. Use this if you want to + # enforce per-user limits. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::DnsV2beta1::ManagedZonesListResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DnsV2beta1::ManagedZonesListResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_managed_zones(project, dns_name: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:get, '{project}/managedZones', options) + command.response_representation = Google::Apis::DnsV2beta1::ManagedZonesListResponse::Representation + command.response_class = Google::Apis::DnsV2beta1::ManagedZonesListResponse + command.params['project'] = project unless project.nil? + command.query['dnsName'] = dns_name unless dns_name.nil? + command.query['maxResults'] = max_results unless max_results.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + + # Update an existing ManagedZone. This method supports patch semantics. + # @param [String] project + # Identifies the project addressed by this request. + # @param [String] managed_zone + # Identifies the managed zone addressed by this request. Can be the managed zone + # name or id. + # @param [Google::Apis::DnsV2beta1::ManagedZone] managed_zone_object + # @param [String] client_operation_id + # For mutating operation requests only. An optional identifier specified by the + # client. Must be unique for operation resources in the Operations collection. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # Overrides userIp if both are provided. + # @param [String] user_ip + # IP address of the site where the request originates. Use this if you want to + # enforce per-user limits. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::DnsV2beta1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DnsV2beta1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def patch_managed_zone(project, managed_zone, managed_zone_object = nil, client_operation_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:patch, '{project}/managedZones/{managedZone}', options) + command.request_representation = Google::Apis::DnsV2beta1::ManagedZone::Representation + command.request_object = managed_zone_object + command.response_representation = Google::Apis::DnsV2beta1::Operation::Representation + command.response_class = Google::Apis::DnsV2beta1::Operation + command.params['project'] = project unless project.nil? + command.params['managedZone'] = managed_zone unless managed_zone.nil? + command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + + # Update an existing ManagedZone. + # @param [String] project + # Identifies the project addressed by this request. + # @param [String] managed_zone + # Identifies the managed zone addressed by this request. Can be the managed zone + # name or id. + # @param [Google::Apis::DnsV2beta1::ManagedZone] managed_zone_object + # @param [String] client_operation_id + # For mutating operation requests only. An optional identifier specified by the + # client. Must be unique for operation resources in the Operations collection. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # Overrides userIp if both are provided. + # @param [String] user_ip + # IP address of the site where the request originates. Use this if you want to + # enforce per-user limits. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::DnsV2beta1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DnsV2beta1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_managed_zone(project, managed_zone, managed_zone_object = nil, client_operation_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:put, '{project}/managedZones/{managedZone}', options) + command.request_representation = Google::Apis::DnsV2beta1::ManagedZone::Representation + command.request_object = managed_zone_object + command.response_representation = Google::Apis::DnsV2beta1::Operation::Representation + command.response_class = Google::Apis::DnsV2beta1::Operation + command.params['project'] = project unless project.nil? + command.params['managedZone'] = managed_zone unless managed_zone.nil? + command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + + # Fetch the representation of an existing Project. + # @param [String] project + # Identifies the project addressed by this request. + # @param [String] client_operation_id + # For mutating operation requests only. An optional identifier specified by the + # client. Must be unique for operation resources in the Operations collection. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # Overrides userIp if both are provided. + # @param [String] user_ip + # IP address of the site where the request originates. Use this if you want to + # enforce per-user limits. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::DnsV2beta1::Project] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DnsV2beta1::Project] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project(project, client_operation_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:get, '{project}', options) + command.response_representation = Google::Apis::DnsV2beta1::Project::Representation + command.response_class = Google::Apis::DnsV2beta1::Project + command.params['project'] = project unless project.nil? + command.query['clientOperationId'] = client_operation_id unless client_operation_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + + # Enumerate ResourceRecordSets that have been created but not yet deleted. + # @param [String] project + # Identifies the project addressed by this request. + # @param [String] managed_zone + # Identifies the managed zone addressed by this request. Can be the managed zone + # name or id. + # @param [Fixnum] max_results + # Optional. Maximum number of results to be returned. If unspecified, the server + # will decide how many results to return. + # @param [String] name + # Restricts the list to return only records with this fully qualified domain + # name. + # @param [String] page_token + # Optional. A tag returned by a previous list request that was truncated. Use + # this parameter to continue a previous list request. + # @param [String] type + # Restricts the list to return only records of this type. If present, the "name" + # parameter must also be present. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # Overrides userIp if both are provided. + # @param [String] user_ip + # IP address of the site where the request originates. Use this if you want to + # enforce per-user limits. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::DnsV2beta1::ResourceRecordSetsListResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DnsV2beta1::ResourceRecordSetsListResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_resource_record_sets(project, managed_zone, max_results: nil, name: nil, page_token: nil, type: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:get, '{project}/managedZones/{managedZone}/rrsets', options) + command.response_representation = Google::Apis::DnsV2beta1::ResourceRecordSetsListResponse::Representation + command.response_class = Google::Apis::DnsV2beta1::ResourceRecordSetsListResponse + command.params['project'] = project unless project.nil? + command.params['managedZone'] = managed_zone unless managed_zone.nil? + command.query['maxResults'] = max_results unless max_results.nil? + command.query['name'] = name unless name.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['type'] = type unless type.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + + protected + + def apply_command_defaults(command) + command.query['key'] = key unless key.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + end + end + end + end +end diff --git a/generated/google/apis/logging_v2beta1/classes.rb b/generated/google/apis/logging_v2beta1/classes.rb index a40227e5f..085ab1e21 100644 --- a/generated/google/apis/logging_v2beta1/classes.rb +++ b/generated/google/apis/logging_v2beta1/classes.rb @@ -22,1024 +22,6 @@ module Google module Apis module LoggingV2beta1 - # The parameters to ListLogEntries. - class ListLogEntriesRequest - include Google::Apis::Core::Hashable - - # Optional. How the results should be sorted. Presently, the only permitted - # values are "timestamp asc" (default) and "timestamp desc". The first option - # returns entries in order of increasing values of LogEntry.timestamp (oldest - # first), and the second option returns entries in order of decreasing - # timestamps (newest first). Entries with equal timestamps are returned in order - # of LogEntry.insertId. - # Corresponds to the JSON property `orderBy` - # @return [String] - attr_accessor :order_by - - # Required. Names of one or more resources from which to retrieve log entries: - # "projects/[PROJECT_ID]" - # "organizations/[ORGANIZATION_ID]" - # Projects listed in the project_ids field are added to this list. - # Corresponds to the JSON property `resourceNames` - # @return [Array] - attr_accessor :resource_names - - # Deprecated. Use resource_names instead. One or more project identifiers or - # project numbers from which to retrieve log entries. Example: "my-project-1A". - # If present, these project identifiers are converted to resource name format - # and added to the list of resources in resource_names. - # Corresponds to the JSON property `projectIds` - # @return [Array] - attr_accessor :project_ids - - # Optional. A filter that chooses which log entries to return. See Advanced Logs - # Filters. Only log entries that match the filter are returned. An empty filter - # matches all log entries in the resources listed in resource_names. Referencing - # a parent resource that is not listed in resource_names will cause the filter - # to return no results. The maximum length of the filter is 20000 characters. - # Corresponds to the JSON property `filter` - # @return [String] - attr_accessor :filter - - # Optional. If present, then retrieve the next batch of results from the - # preceding call to this method. pageToken must be the value of nextPageToken - # from the previous response. The values of other method parameters should be - # identical to those in the previous call. - # Corresponds to the JSON property `pageToken` - # @return [String] - attr_accessor :page_token - - # Optional. The maximum number of results to return from this request. Non- - # positive values are ignored. The presence of nextPageToken in the response - # indicates that more results might be available. - # Corresponds to the JSON property `pageSize` - # @return [Fixnum] - attr_accessor :page_size - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @order_by = args[:order_by] if args.key?(:order_by) - @resource_names = args[:resource_names] if args.key?(:resource_names) - @project_ids = args[:project_ids] if args.key?(:project_ids) - @filter = args[:filter] if args.key?(:filter) - @page_token = args[:page_token] if args.key?(:page_token) - @page_size = args[:page_size] if args.key?(:page_size) - end - end - - # Complete log information about a single HTTP request to an App Engine - # application. - class RequestLog - include Google::Apis::Core::Hashable - - # File or class that handled the request. - # Corresponds to the JSON property `urlMapEntry` - # @return [String] - attr_accessor :url_map_entry - - # If the instance processing this request belongs to a manually scaled module, - # then this is the 0-based index of the instance. Otherwise, this value is -1. - # Corresponds to the JSON property `instanceIndex` - # @return [Fixnum] - attr_accessor :instance_index - - # Internet host and port number of the resource being requested. - # Corresponds to the JSON property `host` - # @return [String] - attr_accessor :host - - # Whether this request is finished or active. - # Corresponds to the JSON property `finished` - # @return [Boolean] - attr_accessor :finished - alias_method :finished?, :finished - - # HTTP version of request. Example: "HTTP/1.1". - # Corresponds to the JSON property `httpVersion` - # @return [String] - attr_accessor :http_version - - # Time when the request started. - # Corresponds to the JSON property `startTime` - # @return [String] - attr_accessor :start_time - - # Latency of the request. - # Corresponds to the JSON property `latency` - # @return [String] - attr_accessor :latency - - # Origin IP address. - # Corresponds to the JSON property `ip` - # @return [String] - attr_accessor :ip - - # Application that handled this request. - # Corresponds to the JSON property `appId` - # @return [String] - attr_accessor :app_id - - # App Engine release version. - # Corresponds to the JSON property `appEngineRelease` - # @return [String] - attr_accessor :app_engine_release - - # Request method. Example: "GET", "HEAD", "PUT", "POST", "DELETE". - # Corresponds to the JSON property `method` - # @return [String] - attr_accessor :method_prop - - # An indication of the relative cost of serving this request. - # Corresponds to the JSON property `cost` - # @return [Float] - attr_accessor :cost - - # An identifier for the instance that handled the request. - # Corresponds to the JSON property `instanceId` - # @return [String] - attr_accessor :instance_id - - # Number of CPU megacycles used to process request. - # Corresponds to the JSON property `megaCycles` - # @return [String] - attr_accessor :mega_cycles - - # Whether this is the first RequestLog entry for this request. If an active - # request has several RequestLog entries written to Stackdriver Logging, then - # this field will be set for one of them. - # Corresponds to the JSON property `first` - # @return [Boolean] - attr_accessor :first - alias_method :first?, :first - - # Version of the application that handled this request. - # Corresponds to the JSON property `versionId` - # @return [String] - attr_accessor :version_id - - # Module of the application that handled this request. - # Corresponds to the JSON property `moduleId` - # @return [String] - attr_accessor :module_id - - # Time when the request finished. - # Corresponds to the JSON property `endTime` - # @return [String] - attr_accessor :end_time - - # User agent that made the request. - # Corresponds to the JSON property `userAgent` - # @return [String] - attr_accessor :user_agent - - # Whether this was a loading request for the instance. - # Corresponds to the JSON property `wasLoadingRequest` - # @return [Boolean] - attr_accessor :was_loading_request - alias_method :was_loading_request?, :was_loading_request - - # Source code for the application that handled this request. There can be more - # than one source reference per deployed application if source code is - # distributed among multiple repositories. - # Corresponds to the JSON property `sourceReference` - # @return [Array] - attr_accessor :source_reference - - # Size in bytes sent back to client by request. - # Corresponds to the JSON property `responseSize` - # @return [String] - attr_accessor :response_size - - # Stackdriver Trace identifier for this request. - # Corresponds to the JSON property `traceId` - # @return [String] - attr_accessor :trace_id - - # A list of log lines emitted by the application while serving this request. - # Corresponds to the JSON property `line` - # @return [Array] - attr_accessor :line - - # Queue name of the request, in the case of an offline request. - # Corresponds to the JSON property `taskQueueName` - # @return [String] - attr_accessor :task_queue_name - - # Referrer URL of request. - # Corresponds to the JSON property `referrer` - # @return [String] - attr_accessor :referrer - - # Globally unique identifier for a request, which is based on the request start - # time. Request IDs for requests which started later will compare greater as - # strings than those for requests which started earlier. - # Corresponds to the JSON property `requestId` - # @return [String] - attr_accessor :request_id - - # The logged-in user who made the request.Most likely, this is the part of the - # user's email before the @ sign. The field value is the same for different - # requests from the same user, but different users can have similar names. This - # information is also available to the application via the App Engine Users API. - # This field will be populated starting with App Engine 1.9.21. - # Corresponds to the JSON property `nickname` - # @return [String] - attr_accessor :nickname - - # HTTP response status code. Example: 200, 404. - # Corresponds to the JSON property `status` - # @return [Fixnum] - attr_accessor :status - - # Contains the path and query portion of the URL that was requested. For example, - # if the URL was "http://example.com/app?name=val", the resource would be "/app? - # name=val". The fragment identifier, which is identified by the # character, is - # not included. - # Corresponds to the JSON property `resource` - # @return [String] - attr_accessor :resource - - # Time this request spent in the pending request queue. - # Corresponds to the JSON property `pendingTime` - # @return [String] - attr_accessor :pending_time - - # Task name of the request, in the case of an offline request. - # Corresponds to the JSON property `taskName` - # @return [String] - attr_accessor :task_name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @url_map_entry = args[:url_map_entry] if args.key?(:url_map_entry) - @instance_index = args[:instance_index] if args.key?(:instance_index) - @host = args[:host] if args.key?(:host) - @finished = args[:finished] if args.key?(:finished) - @http_version = args[:http_version] if args.key?(:http_version) - @start_time = args[:start_time] if args.key?(:start_time) - @latency = args[:latency] if args.key?(:latency) - @ip = args[:ip] if args.key?(:ip) - @app_id = args[:app_id] if args.key?(:app_id) - @app_engine_release = args[:app_engine_release] if args.key?(:app_engine_release) - @method_prop = args[:method_prop] if args.key?(:method_prop) - @cost = args[:cost] if args.key?(:cost) - @instance_id = args[:instance_id] if args.key?(:instance_id) - @mega_cycles = args[:mega_cycles] if args.key?(:mega_cycles) - @first = args[:first] if args.key?(:first) - @version_id = args[:version_id] if args.key?(:version_id) - @module_id = args[:module_id] if args.key?(:module_id) - @end_time = args[:end_time] if args.key?(:end_time) - @user_agent = args[:user_agent] if args.key?(:user_agent) - @was_loading_request = args[:was_loading_request] if args.key?(:was_loading_request) - @source_reference = args[:source_reference] if args.key?(:source_reference) - @response_size = args[:response_size] if args.key?(:response_size) - @trace_id = args[:trace_id] if args.key?(:trace_id) - @line = args[:line] if args.key?(:line) - @task_queue_name = args[:task_queue_name] if args.key?(:task_queue_name) - @referrer = args[:referrer] if args.key?(:referrer) - @request_id = args[:request_id] if args.key?(:request_id) - @nickname = args[:nickname] if args.key?(:nickname) - @status = args[:status] if args.key?(:status) - @resource = args[:resource] if args.key?(:resource) - @pending_time = args[:pending_time] if args.key?(:pending_time) - @task_name = args[:task_name] if args.key?(:task_name) - end - end - - # Result returned from ListMonitoredResourceDescriptors. - class ListMonitoredResourceDescriptorsResponse - include Google::Apis::Core::Hashable - - # If there might be more results than those appearing in this response, then - # nextPageToken is included. To get the next set of results, call this method - # again using the value of nextPageToken as pageToken. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # A list of resource descriptors. - # Corresponds to the JSON property `resourceDescriptors` - # @return [Array] - attr_accessor :resource_descriptors - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - @resource_descriptors = args[:resource_descriptors] if args.key?(:resource_descriptors) - end - end - - # A reference to a particular snapshot of the source tree used to build and - # deploy an application. - class SourceReference - include Google::Apis::Core::Hashable - - # Optional. A URI string identifying the repository. Example: "https://github. - # com/GoogleCloudPlatform/kubernetes.git" - # Corresponds to the JSON property `repository` - # @return [String] - attr_accessor :repository - - # The canonical and persistent identifier of the deployed revision. Example (git) - # : "0035781c50ec7aa23385dc841529ce8a4b70db1b" - # Corresponds to the JSON property `revisionId` - # @return [String] - attr_accessor :revision_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @repository = args[:repository] if args.key?(:repository) - @revision_id = args[:revision_id] if args.key?(:revision_id) - end - end - - # Describes a logs-based metric. The value of the metric is the number of log - # entries that match a logs filter in a given time interval. - class LogMetric - include Google::Apis::Core::Hashable - - # Required. An advanced logs filter which is used to match log entries. Example: - # "resource.type=gae_app AND severity>=ERROR" - # The maximum length of the filter is 20000 characters. - # Corresponds to the JSON property `filter` - # @return [String] - attr_accessor :filter - - # Required. The client-assigned metric identifier. Examples: "error_count", " - # nginx/requests".Metric identifiers are limited to 100 characters and can - # include only the following characters: A-Z, a-z, 0-9, and the special - # characters _-.,+!*',()%/. The forward-slash character (/) denotes a hierarchy - # of name pieces, and it cannot be the first character of the name.The metric - # identifier in this field must not be URL-encoded (https://en.wikipedia.org/ - # wiki/Percent-encoding). However, when the metric identifier appears as the [ - # METRIC_ID] part of a metric_name API parameter, then the metric identifier - # must be URL-encoded. Example: "projects/my-project/metrics/nginx%2Frequests". - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Optional. A description of this metric, which is used in documentation. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Output only. The API version that created or updated this metric. The version - # also dictates the syntax of the filter expression. When a value for this field - # is missing, the default value of V2 should be assumed. - # Corresponds to the JSON property `version` - # @return [String] - attr_accessor :version - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @filter = args[:filter] if args.key?(:filter) - @name = args[:name] if args.key?(:name) - @description = args[:description] if args.key?(:description) - @version = args[:version] if args.key?(:version) - end - end - - # Result returned from WriteLogEntries. empty - class WriteLogEntriesResponse - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # Additional information about a potentially long-running operation with which a - # log entry is associated. - class LogEntryOperation - include Google::Apis::Core::Hashable - - # Optional. An arbitrary operation identifier. Log entries with the same - # identifier are assumed to be part of the same operation. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Optional. An arbitrary producer identifier. The combination of id and producer - # must be globally unique. Examples for producer: "MyDivision.MyBigCompany.com", - # "github.com/MyProject/MyApplication". - # Corresponds to the JSON property `producer` - # @return [String] - attr_accessor :producer - - # Optional. Set this to True if this is the first log entry in the operation. - # Corresponds to the JSON property `first` - # @return [Boolean] - attr_accessor :first - alias_method :first?, :first - - # Optional. Set this to True if this is the last log entry in the operation. - # Corresponds to the JSON property `last` - # @return [Boolean] - attr_accessor :last - alias_method :last?, :last - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] if args.key?(:id) - @producer = args[:producer] if args.key?(:producer) - @first = args[:first] if args.key?(:first) - @last = args[:last] if args.key?(:last) - end - end - - # An object representing a resource that can be used for monitoring, logging, - # billing, or other purposes. Examples include virtual machine instances, - # databases, and storage devices such as disks. The type field identifies a - # MonitoredResourceDescriptor object that describes the resource's schema. - # Information in the labels field identifies the actual resource and its - # attributes according to the schema. For example, a particular Compute Engine - # VM instance could be represented by the following object, because the - # MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and " - # zone": - # ` "type": "gce_instance", - # "labels": ` "instance_id": "12345678901234", - # "zone": "us-central1-a" `` - class MonitoredResource - include Google::Apis::Core::Hashable - - # Required. The monitored resource type. This field must match the type field of - # a MonitoredResourceDescriptor object. For example, the type of a Cloud SQL - # database is "cloudsql_database". - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # Required. Values for all of the labels listed in the associated monitored - # resource descriptor. For example, Cloud SQL databases use the labels " - # database_id" and "zone". - # Corresponds to the JSON property `labels` - # @return [Hash] - attr_accessor :labels - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @type = args[:type] if args.key?(:type) - @labels = args[:labels] if args.key?(:labels) - end - end - - # The parameters to WriteLogEntries. - class WriteLogEntriesRequest - include Google::Apis::Core::Hashable - - # Optional. A default log resource name that is assigned to all log entries in - # entries that do not specify a value for log_name: - # "projects/[PROJECT_ID]/logs/[LOG_ID]" - # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" - # [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog" - # or "organizations/1234567890/logs/cloudresourcemanager.googleapis.com% - # 2Factivity". For more information about log names, see LogEntry. - # Corresponds to the JSON property `logName` - # @return [String] - attr_accessor :log_name - - # Required. The log entries to write. Values supplied for the fields log_name, - # resource, and labels in this entries.write request are added to those log - # entries that do not provide their own values for the fields.To improve - # throughput and to avoid exceeding the quota limit for calls to entries.write, - # you should write multiple log entries at once rather than calling this method - # for each individual log entry. - # Corresponds to the JSON property `entries` - # @return [Array] - attr_accessor :entries - - # Optional. Whether valid entries should be written even if some other entries - # fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any entry is not - # written, the response status will be the error associated with one of the - # failed entries and include error details in the form of - # WriteLogEntriesPartialErrors. - # Corresponds to the JSON property `partialSuccess` - # @return [Boolean] - attr_accessor :partial_success - alias_method :partial_success?, :partial_success - - # Optional. Default labels that are added to the labels field of all log entries - # in entries. If a log entry already has a label with the same key as a label in - # this parameter, then the log entry's label is not changed. See LogEntry. - # Corresponds to the JSON property `labels` - # @return [Hash] - attr_accessor :labels - - # An object representing a resource that can be used for monitoring, logging, - # billing, or other purposes. Examples include virtual machine instances, - # databases, and storage devices such as disks. The type field identifies a - # MonitoredResourceDescriptor object that describes the resource's schema. - # Information in the labels field identifies the actual resource and its - # attributes according to the schema. For example, a particular Compute Engine - # VM instance could be represented by the following object, because the - # MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and " - # zone": - # ` "type": "gce_instance", - # "labels": ` "instance_id": "12345678901234", - # "zone": "us-central1-a" `` - # Corresponds to the JSON property `resource` - # @return [Google::Apis::LoggingV2beta1::MonitoredResource] - attr_accessor :resource - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @log_name = args[:log_name] if args.key?(:log_name) - @entries = args[:entries] if args.key?(:entries) - @partial_success = args[:partial_success] if args.key?(:partial_success) - @labels = args[:labels] if args.key?(:labels) - @resource = args[:resource] if args.key?(:resource) - end - end - - # Describes a sink used to export log entries to one of the following - # destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a - # Cloud Pub/Sub topic. A logs filter controls which log entries are exported. - # The sink must be created within a project or organization. - class LogSink - include Google::Apis::Core::Hashable - - # Optional. The time at which this sink will begin exporting log entries. Log - # entries are exported only if their timestamp is not earlier than the start - # time. The default value of this field is the time the sink is created or - # updated. - # Corresponds to the JSON property `startTime` - # @return [String] - attr_accessor :start_time - - # Output only. An IAM identity—a service account or group—under - # which Stackdriver Logging writes the exported log entries to the sink's - # destination. This field is set by sinks.create and sinks.update, based on the - # setting of unique_writer_identity in those methods.Until you grant this - # identity write-access to the destination, log entry exports from this sink - # will fail. For more information, see Granting access for a resource. Consult - # the destination service's documentation to determine the appropriate IAM roles - # to assign to the identity. - # Corresponds to the JSON property `writerIdentity` - # @return [String] - attr_accessor :writer_identity - - # Optional. The log entry format to use for this sink's exported log entries. - # The v2 format is used by default. The v1 format is deprecated and should be - # used only as part of a migration effort to v2. See Migration to the v2 API. - # Corresponds to the JSON property `outputVersionFormat` - # @return [String] - attr_accessor :output_version_format - - # Required. The client-assigned sink identifier, unique within the project. - # Example: "my-syslog-errors-to-pubsub". Sink identifiers are limited to 100 - # characters and can include only the following characters: upper and lower-case - # alphanumeric characters, underscores, hyphens, and periods. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Required. The export destination: - # "storage.googleapis.com/[GCS_BUCKET]" - # "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]" - # "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]" - # The sink's writer_identity, set when the sink is created, must have permission - # to write to the destination or else the log entries are not exported. For more - # information, see Exporting Logs With Sinks. - # Corresponds to the JSON property `destination` - # @return [String] - attr_accessor :destination - - # Optional. An advanced logs filter. The only exported log entries are those - # that are in the resource owning the sink and that match the filter. The filter - # must use the log entry format specified by the output_version_format parameter. - # For example, in the v2 format: - # logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR - # Corresponds to the JSON property `filter` - # @return [String] - attr_accessor :filter - - # Optional. The time at which this sink will stop exporting log entries. Log - # entries are exported only if their timestamp is earlier than the end time. If - # this field is not supplied, there is no end time. If both a start time and an - # end time are provided, then the end time must be later than the start time. - # Corresponds to the JSON property `endTime` - # @return [String] - attr_accessor :end_time - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @start_time = args[:start_time] if args.key?(:start_time) - @writer_identity = args[:writer_identity] if args.key?(:writer_identity) - @output_version_format = args[:output_version_format] if args.key?(:output_version_format) - @name = args[:name] if args.key?(:name) - @destination = args[:destination] if args.key?(:destination) - @filter = args[:filter] if args.key?(:filter) - @end_time = args[:end_time] if args.key?(:end_time) - end - end - - # Result returned from ListLogs. - class ListLogsResponse - include Google::Apis::Core::Hashable - - # If there might be more results than those appearing in this response, then - # nextPageToken is included. To get the next set of results, call this method - # again using the value of nextPageToken as pageToken. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # A list of log names. For example, "projects/my-project/syslog" or " - # organizations/123/cloudresourcemanager.googleapis.com%2Factivity". - # Corresponds to the JSON property `logNames` - # @return [Array] - attr_accessor :log_names - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - @log_names = args[:log_names] if args.key?(:log_names) - end - end - - # Result returned from ListSinks. - class ListSinksResponse - include Google::Apis::Core::Hashable - - # A list of sinks. - # Corresponds to the JSON property `sinks` - # @return [Array] - attr_accessor :sinks - - # If there might be more results than appear in this response, then - # nextPageToken is included. To get the next set of results, call the same - # method again using the value of nextPageToken as pageToken. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @sinks = args[:sinks] if args.key?(:sinks) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - - # A common proto for logging HTTP requests. Only contains semantics defined by - # the HTTP specification. Product-specific logging information MUST be defined - # in a separate message. - class HttpRequest - include Google::Apis::Core::Hashable - - # The request processing latency on the server, from the time the request was - # received until the response was sent. - # Corresponds to the JSON property `latency` - # @return [String] - attr_accessor :latency - - # The user agent sent by the client. Example: "Mozilla/4.0 (compatible; MSIE 6.0; - # Windows 98; Q312461; .NET CLR 1.0.3705)". - # Corresponds to the JSON property `userAgent` - # @return [String] - attr_accessor :user_agent - - # The number of HTTP response bytes inserted into cache. Set only when a cache - # fill was attempted. - # Corresponds to the JSON property `cacheFillBytes` - # @return [String] - attr_accessor :cache_fill_bytes - - # The request method. Examples: "GET", "HEAD", "PUT", "POST". - # Corresponds to the JSON property `requestMethod` - # @return [String] - attr_accessor :request_method - - # The size of the HTTP request message in bytes, including the request headers - # and the request body. - # Corresponds to the JSON property `requestSize` - # @return [String] - attr_accessor :request_size - - # The size of the HTTP response message sent back to the client, in bytes, - # including the response headers and the response body. - # Corresponds to the JSON property `responseSize` - # @return [String] - attr_accessor :response_size - - # The scheme (http, https), the host name, the path and the query portion of the - # URL that was requested. Example: "http://example.com/some/info?color=red". - # Corresponds to the JSON property `requestUrl` - # @return [String] - attr_accessor :request_url - - # The IP address (IPv4 or IPv6) of the client that issued the HTTP request. - # Examples: "192.168.1.1", "FE80::0202:B3FF:FE1E:8329". - # Corresponds to the JSON property `remoteIp` - # @return [String] - attr_accessor :remote_ip - - # The IP address (IPv4 or IPv6) of the origin server that the request was sent - # to. - # Corresponds to the JSON property `serverIp` - # @return [String] - attr_accessor :server_ip - - # Whether or not a cache lookup was attempted. - # Corresponds to the JSON property `cacheLookup` - # @return [Boolean] - attr_accessor :cache_lookup - alias_method :cache_lookup?, :cache_lookup - - # Whether or not an entity was served from cache (with or without validation). - # Corresponds to the JSON property `cacheHit` - # @return [Boolean] - attr_accessor :cache_hit - alias_method :cache_hit?, :cache_hit - - # Whether or not the response was validated with the origin server before being - # served from cache. This field is only meaningful if cache_hit is True. - # Corresponds to the JSON property `cacheValidatedWithOriginServer` - # @return [Boolean] - attr_accessor :cache_validated_with_origin_server - alias_method :cache_validated_with_origin_server?, :cache_validated_with_origin_server - - # The response code indicating the status of response. Examples: 200, 404. - # Corresponds to the JSON property `status` - # @return [Fixnum] - attr_accessor :status - - # The referer URL of the request, as defined in HTTP/1.1 Header Field - # Definitions (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). - # Corresponds to the JSON property `referer` - # @return [String] - attr_accessor :referer - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @latency = args[:latency] if args.key?(:latency) - @user_agent = args[:user_agent] if args.key?(:user_agent) - @cache_fill_bytes = args[:cache_fill_bytes] if args.key?(:cache_fill_bytes) - @request_method = args[:request_method] if args.key?(:request_method) - @request_size = args[:request_size] if args.key?(:request_size) - @response_size = args[:response_size] if args.key?(:response_size) - @request_url = args[:request_url] if args.key?(:request_url) - @remote_ip = args[:remote_ip] if args.key?(:remote_ip) - @server_ip = args[:server_ip] if args.key?(:server_ip) - @cache_lookup = args[:cache_lookup] if args.key?(:cache_lookup) - @cache_hit = args[:cache_hit] if args.key?(:cache_hit) - @cache_validated_with_origin_server = args[:cache_validated_with_origin_server] if args.key?(:cache_validated_with_origin_server) - @status = args[:status] if args.key?(:status) - @referer = args[:referer] if args.key?(:referer) - end - end - - # A description of a label. - class LabelDescriptor - include Google::Apis::Core::Hashable - - # The label key. - # Corresponds to the JSON property `key` - # @return [String] - attr_accessor :key - - # A human-readable description for the label. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # The type of data that can be assigned to the label. - # Corresponds to the JSON property `valueType` - # @return [String] - attr_accessor :value_type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @key = args[:key] if args.key?(:key) - @description = args[:description] if args.key?(:description) - @value_type = args[:value_type] if args.key?(:value_type) - end - end - - # An object that describes the schema of a MonitoredResource object using a type - # name and a set of labels. For example, the monitored resource descriptor for - # Google Compute Engine VM instances has a type of "gce_instance" and specifies - # the use of the labels "instance_id" and "zone" to identify particular VM - # instances.Different APIs can support different monitored resource types. APIs - # generally provide a list method that returns the monitored resource - # descriptors used by the API. - class MonitoredResourceDescriptor - include Google::Apis::Core::Hashable - - # Required. The monitored resource type. For example, the type " - # cloudsql_database" represents databases in Google Cloud SQL. The maximum - # length of this value is 256 characters. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # Required. A set of labels used to describe instances of this monitored - # resource type. For example, an individual Google Cloud SQL database is - # identified by values for the labels "database_id" and "zone". - # Corresponds to the JSON property `labels` - # @return [Array] - attr_accessor :labels - - # Optional. The resource name of the monitored resource descriptor: "projects/` - # project_id`/monitoredResourceDescriptors/`type`" where `type` is the value of - # the type field in this object and `project_id` is a project ID that provides - # API-specific context for accessing the type. APIs that do not use project - # information can use the resource name format "monitoredResourceDescriptors/` - # type`". - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Optional. A concise name for the monitored resource type that might be - # displayed in user interfaces. It should be a Title Cased Noun Phrase, without - # any article or other determiners. For example, "Google Cloud SQL Database". - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # Optional. A detailed description of the monitored resource type that might be - # used in documentation. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @type = args[:type] if args.key?(:type) - @labels = args[:labels] if args.key?(:labels) - @name = args[:name] if args.key?(:name) - @display_name = args[:display_name] if args.key?(:display_name) - @description = args[:description] if args.key?(:description) - end - end - - # Additional information about the source code location that produced the log - # entry. - class LogEntrySourceLocation - include Google::Apis::Core::Hashable - - # Optional. Source file name. Depending on the runtime environment, this might - # be a simple name or a fully-qualified name. - # Corresponds to the JSON property `file` - # @return [String] - attr_accessor :file - - # Optional. Human-readable name of the function or method being invoked, with - # optional context such as the class or package name. This information may be - # used in contexts such as the logs viewer, where a file and line number are - # less meaningful. The format can vary by language. For example: qual.if.ied. - # Class.method (Java), dir/package.func (Go), function (Python). - # Corresponds to the JSON property `function` - # @return [String] - attr_accessor :function - - # Optional. Line within the source file. 1-based; 0 indicates no line number - # available. - # Corresponds to the JSON property `line` - # @return [String] - attr_accessor :line - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @file = args[:file] if args.key?(:file) - @function = args[:function] if args.key?(:function) - @line = args[:line] if args.key?(:line) - end - end - - # Result returned from ListLogEntries. - class ListLogEntriesResponse - include Google::Apis::Core::Hashable - - # If there might be more results than those appearing in this response, then - # nextPageToken is included. To get the next set of results, call this method - # again using the value of nextPageToken as pageToken.If a value for - # next_page_token appears and the entries field is empty, it means that the - # search found no log entries so far but it did not have time to search all the - # possible log entries. Retry the method with this value for page_token to - # continue the search. Alternatively, consider speeding up the search by - # changing your filter to specify a single log name or resource type, or to - # narrow the time range of the search. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # A list of log entries. - # Corresponds to the JSON property `entries` - # @return [Array] - attr_accessor :entries - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - @entries = args[:entries] if args.key?(:entries) - end - end - - # Application log line emitted while processing a request. - class LogLine - include Google::Apis::Core::Hashable - - # Severity of this log entry. - # Corresponds to the JSON property `severity` - # @return [String] - attr_accessor :severity - - # App-provided log message. - # Corresponds to the JSON property `logMessage` - # @return [String] - attr_accessor :log_message - - # Specifies a location in a source code file. - # Corresponds to the JSON property `sourceLocation` - # @return [Google::Apis::LoggingV2beta1::SourceLocation] - attr_accessor :source_location - - # Approximate time when this log entry was made. - # Corresponds to the JSON property `time` - # @return [String] - attr_accessor :time - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @severity = args[:severity] if args.key?(:severity) - @log_message = args[:log_message] if args.key?(:log_message) - @source_location = args[:source_location] if args.key?(:source_location) - @time = args[:time] if args.key?(:time) - end - end - # Result returned from ListLogMetrics. class ListLogMetricsResponse include Google::Apis::Core::Hashable @@ -1218,6 +200,11 @@ module Google class SourceLocation include Google::Apis::Core::Hashable + # Line within the source file. + # Corresponds to the JSON property `line` + # @return [String] + attr_accessor :line + # Source file name. Depending on the runtime environment, this might be a simple # name or a fully-qualified name. # Corresponds to the JSON property `file` @@ -1233,7 +220,950 @@ module Google # @return [String] attr_accessor :function_name - # Line within the source file. + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @line = args[:line] if args.key?(:line) + @file = args[:file] if args.key?(:file) + @function_name = args[:function_name] if args.key?(:function_name) + end + end + + # The parameters to ListLogEntries. + class ListLogEntriesRequest + include Google::Apis::Core::Hashable + + # Deprecated. Use resource_names instead. One or more project identifiers or + # project numbers from which to retrieve log entries. Example: "my-project-1A". + # If present, these project identifiers are converted to resource name format + # and added to the list of resources in resource_names. + # Corresponds to the JSON property `projectIds` + # @return [Array] + attr_accessor :project_ids + + # Optional. A filter that chooses which log entries to return. See Advanced Logs + # Filters. Only log entries that match the filter are returned. An empty filter + # matches all log entries in the resources listed in resource_names. Referencing + # a parent resource that is not listed in resource_names will cause the filter + # to return no results. The maximum length of the filter is 20000 characters. + # Corresponds to the JSON property `filter` + # @return [String] + attr_accessor :filter + + # Optional. If present, then retrieve the next batch of results from the + # preceding call to this method. pageToken must be the value of nextPageToken + # from the previous response. The values of other method parameters should be + # identical to those in the previous call. + # Corresponds to the JSON property `pageToken` + # @return [String] + attr_accessor :page_token + + # Optional. The maximum number of results to return from this request. Non- + # positive values are ignored. The presence of nextPageToken in the response + # indicates that more results might be available. + # Corresponds to the JSON property `pageSize` + # @return [Fixnum] + attr_accessor :page_size + + # Optional. How the results should be sorted. Presently, the only permitted + # values are "timestamp asc" (default) and "timestamp desc". The first option + # returns entries in order of increasing values of LogEntry.timestamp (oldest + # first), and the second option returns entries in order of decreasing + # timestamps (newest first). Entries with equal timestamps are returned in order + # of LogEntry.insertId. + # Corresponds to the JSON property `orderBy` + # @return [String] + attr_accessor :order_by + + # Required. Names of one or more resources from which to retrieve log entries: + # "projects/[PROJECT_ID]" + # "organizations/[ORGANIZATION_ID]" + # Projects listed in the project_ids field are added to this list. + # Corresponds to the JSON property `resourceNames` + # @return [Array] + attr_accessor :resource_names + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @project_ids = args[:project_ids] if args.key?(:project_ids) + @filter = args[:filter] if args.key?(:filter) + @page_token = args[:page_token] if args.key?(:page_token) + @page_size = args[:page_size] if args.key?(:page_size) + @order_by = args[:order_by] if args.key?(:order_by) + @resource_names = args[:resource_names] if args.key?(:resource_names) + end + end + + # Complete log information about a single HTTP request to an App Engine + # application. + class RequestLog + include Google::Apis::Core::Hashable + + # The logged-in user who made the request.Most likely, this is the part of the + # user's email before the @ sign. The field value is the same for different + # requests from the same user, but different users can have similar names. This + # information is also available to the application via the App Engine Users API. + # This field will be populated starting with App Engine 1.9.21. + # Corresponds to the JSON property `nickname` + # @return [String] + attr_accessor :nickname + + # HTTP response status code. Example: 200, 404. + # Corresponds to the JSON property `status` + # @return [Fixnum] + attr_accessor :status + + # Contains the path and query portion of the URL that was requested. For example, + # if the URL was "http://example.com/app?name=val", the resource would be "/app? + # name=val". The fragment identifier, which is identified by the # character, is + # not included. + # Corresponds to the JSON property `resource` + # @return [String] + attr_accessor :resource + + # Time this request spent in the pending request queue. + # Corresponds to the JSON property `pendingTime` + # @return [String] + attr_accessor :pending_time + + # Task name of the request, in the case of an offline request. + # Corresponds to the JSON property `taskName` + # @return [String] + attr_accessor :task_name + + # File or class that handled the request. + # Corresponds to the JSON property `urlMapEntry` + # @return [String] + attr_accessor :url_map_entry + + # If the instance processing this request belongs to a manually scaled module, + # then this is the 0-based index of the instance. Otherwise, this value is -1. + # Corresponds to the JSON property `instanceIndex` + # @return [Fixnum] + attr_accessor :instance_index + + # Internet host and port number of the resource being requested. + # Corresponds to the JSON property `host` + # @return [String] + attr_accessor :host + + # Whether this request is finished or active. + # Corresponds to the JSON property `finished` + # @return [Boolean] + attr_accessor :finished + alias_method :finished?, :finished + + # HTTP version of request. Example: "HTTP/1.1". + # Corresponds to the JSON property `httpVersion` + # @return [String] + attr_accessor :http_version + + # Time when the request started. + # Corresponds to the JSON property `startTime` + # @return [String] + attr_accessor :start_time + + # Latency of the request. + # Corresponds to the JSON property `latency` + # @return [String] + attr_accessor :latency + + # Origin IP address. + # Corresponds to the JSON property `ip` + # @return [String] + attr_accessor :ip + + # Application that handled this request. + # Corresponds to the JSON property `appId` + # @return [String] + attr_accessor :app_id + + # App Engine release version. + # Corresponds to the JSON property `appEngineRelease` + # @return [String] + attr_accessor :app_engine_release + + # Request method. Example: "GET", "HEAD", "PUT", "POST", "DELETE". + # Corresponds to the JSON property `method` + # @return [String] + attr_accessor :method_prop + + # An indication of the relative cost of serving this request. + # Corresponds to the JSON property `cost` + # @return [Float] + attr_accessor :cost + + # An identifier for the instance that handled the request. + # Corresponds to the JSON property `instanceId` + # @return [String] + attr_accessor :instance_id + + # Number of CPU megacycles used to process request. + # Corresponds to the JSON property `megaCycles` + # @return [String] + attr_accessor :mega_cycles + + # Whether this is the first RequestLog entry for this request. If an active + # request has several RequestLog entries written to Stackdriver Logging, then + # this field will be set for one of them. + # Corresponds to the JSON property `first` + # @return [Boolean] + attr_accessor :first + alias_method :first?, :first + + # Version of the application that handled this request. + # Corresponds to the JSON property `versionId` + # @return [String] + attr_accessor :version_id + + # Module of the application that handled this request. + # Corresponds to the JSON property `moduleId` + # @return [String] + attr_accessor :module_id + + # Time when the request finished. + # Corresponds to the JSON property `endTime` + # @return [String] + attr_accessor :end_time + + # User agent that made the request. + # Corresponds to the JSON property `userAgent` + # @return [String] + attr_accessor :user_agent + + # Whether this was a loading request for the instance. + # Corresponds to the JSON property `wasLoadingRequest` + # @return [Boolean] + attr_accessor :was_loading_request + alias_method :was_loading_request?, :was_loading_request + + # Source code for the application that handled this request. There can be more + # than one source reference per deployed application if source code is + # distributed among multiple repositories. + # Corresponds to the JSON property `sourceReference` + # @return [Array] + attr_accessor :source_reference + + # Size in bytes sent back to client by request. + # Corresponds to the JSON property `responseSize` + # @return [String] + attr_accessor :response_size + + # Stackdriver Trace identifier for this request. + # Corresponds to the JSON property `traceId` + # @return [String] + attr_accessor :trace_id + + # A list of log lines emitted by the application while serving this request. + # Corresponds to the JSON property `line` + # @return [Array] + attr_accessor :line + + # Queue name of the request, in the case of an offline request. + # Corresponds to the JSON property `taskQueueName` + # @return [String] + attr_accessor :task_queue_name + + # Referrer URL of request. + # Corresponds to the JSON property `referrer` + # @return [String] + attr_accessor :referrer + + # Globally unique identifier for a request, which is based on the request start + # time. Request IDs for requests which started later will compare greater as + # strings than those for requests which started earlier. + # Corresponds to the JSON property `requestId` + # @return [String] + attr_accessor :request_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @nickname = args[:nickname] if args.key?(:nickname) + @status = args[:status] if args.key?(:status) + @resource = args[:resource] if args.key?(:resource) + @pending_time = args[:pending_time] if args.key?(:pending_time) + @task_name = args[:task_name] if args.key?(:task_name) + @url_map_entry = args[:url_map_entry] if args.key?(:url_map_entry) + @instance_index = args[:instance_index] if args.key?(:instance_index) + @host = args[:host] if args.key?(:host) + @finished = args[:finished] if args.key?(:finished) + @http_version = args[:http_version] if args.key?(:http_version) + @start_time = args[:start_time] if args.key?(:start_time) + @latency = args[:latency] if args.key?(:latency) + @ip = args[:ip] if args.key?(:ip) + @app_id = args[:app_id] if args.key?(:app_id) + @app_engine_release = args[:app_engine_release] if args.key?(:app_engine_release) + @method_prop = args[:method_prop] if args.key?(:method_prop) + @cost = args[:cost] if args.key?(:cost) + @instance_id = args[:instance_id] if args.key?(:instance_id) + @mega_cycles = args[:mega_cycles] if args.key?(:mega_cycles) + @first = args[:first] if args.key?(:first) + @version_id = args[:version_id] if args.key?(:version_id) + @module_id = args[:module_id] if args.key?(:module_id) + @end_time = args[:end_time] if args.key?(:end_time) + @user_agent = args[:user_agent] if args.key?(:user_agent) + @was_loading_request = args[:was_loading_request] if args.key?(:was_loading_request) + @source_reference = args[:source_reference] if args.key?(:source_reference) + @response_size = args[:response_size] if args.key?(:response_size) + @trace_id = args[:trace_id] if args.key?(:trace_id) + @line = args[:line] if args.key?(:line) + @task_queue_name = args[:task_queue_name] if args.key?(:task_queue_name) + @referrer = args[:referrer] if args.key?(:referrer) + @request_id = args[:request_id] if args.key?(:request_id) + end + end + + # Result returned from ListMonitoredResourceDescriptors. + class ListMonitoredResourceDescriptorsResponse + include Google::Apis::Core::Hashable + + # If there might be more results than those appearing in this response, then + # nextPageToken is included. To get the next set of results, call this method + # again using the value of nextPageToken as pageToken. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # A list of resource descriptors. + # Corresponds to the JSON property `resourceDescriptors` + # @return [Array] + attr_accessor :resource_descriptors + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @resource_descriptors = args[:resource_descriptors] if args.key?(:resource_descriptors) + end + end + + # A reference to a particular snapshot of the source tree used to build and + # deploy an application. + class SourceReference + include Google::Apis::Core::Hashable + + # Optional. A URI string identifying the repository. Example: "https://github. + # com/GoogleCloudPlatform/kubernetes.git" + # Corresponds to the JSON property `repository` + # @return [String] + attr_accessor :repository + + # The canonical and persistent identifier of the deployed revision. Example (git) + # : "0035781c50ec7aa23385dc841529ce8a4b70db1b" + # Corresponds to the JSON property `revisionId` + # @return [String] + attr_accessor :revision_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @repository = args[:repository] if args.key?(:repository) + @revision_id = args[:revision_id] if args.key?(:revision_id) + end + end + + # Describes a logs-based metric. The value of the metric is the number of log + # entries that match a logs filter in a given time interval. + class LogMetric + include Google::Apis::Core::Hashable + + # Required. The client-assigned metric identifier. Examples: "error_count", " + # nginx/requests".Metric identifiers are limited to 100 characters and can + # include only the following characters: A-Z, a-z, 0-9, and the special + # characters _-.,+!*',()%/. The forward-slash character (/) denotes a hierarchy + # of name pieces, and it cannot be the first character of the name.The metric + # identifier in this field must not be URL-encoded (https://en.wikipedia.org/ + # wiki/Percent-encoding). However, when the metric identifier appears as the [ + # METRIC_ID] part of a metric_name API parameter, then the metric identifier + # must be URL-encoded. Example: "projects/my-project/metrics/nginx%2Frequests". + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Optional. A description of this metric, which is used in documentation. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # Output only. The API version that created or updated this metric. The version + # also dictates the syntax of the filter expression. When a value for this field + # is missing, the default value of V2 should be assumed. + # Corresponds to the JSON property `version` + # @return [String] + attr_accessor :version + + # Required. An advanced logs filter which is used to match log entries. Example: + # "resource.type=gae_app AND severity>=ERROR" + # The maximum length of the filter is 20000 characters. + # Corresponds to the JSON property `filter` + # @return [String] + attr_accessor :filter + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @name = args[:name] if args.key?(:name) + @description = args[:description] if args.key?(:description) + @version = args[:version] if args.key?(:version) + @filter = args[:filter] if args.key?(:filter) + end + end + + # Additional information about a potentially long-running operation with which a + # log entry is associated. + class LogEntryOperation + include Google::Apis::Core::Hashable + + # Optional. An arbitrary operation identifier. Log entries with the same + # identifier are assumed to be part of the same operation. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # Optional. An arbitrary producer identifier. The combination of id and producer + # must be globally unique. Examples for producer: "MyDivision.MyBigCompany.com", + # "github.com/MyProject/MyApplication". + # Corresponds to the JSON property `producer` + # @return [String] + attr_accessor :producer + + # Optional. Set this to True if this is the first log entry in the operation. + # Corresponds to the JSON property `first` + # @return [Boolean] + attr_accessor :first + alias_method :first?, :first + + # Optional. Set this to True if this is the last log entry in the operation. + # Corresponds to the JSON property `last` + # @return [Boolean] + attr_accessor :last + alias_method :last?, :last + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @id = args[:id] if args.key?(:id) + @producer = args[:producer] if args.key?(:producer) + @first = args[:first] if args.key?(:first) + @last = args[:last] if args.key?(:last) + end + end + + # Result returned from WriteLogEntries. empty + class WriteLogEntriesResponse + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # An object representing a resource that can be used for monitoring, logging, + # billing, or other purposes. Examples include virtual machine instances, + # databases, and storage devices such as disks. The type field identifies a + # MonitoredResourceDescriptor object that describes the resource's schema. + # Information in the labels field identifies the actual resource and its + # attributes according to the schema. For example, a particular Compute Engine + # VM instance could be represented by the following object, because the + # MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and " + # zone": + # ` "type": "gce_instance", + # "labels": ` "instance_id": "12345678901234", + # "zone": "us-central1-a" `` + class MonitoredResource + include Google::Apis::Core::Hashable + + # Required. Values for all of the labels listed in the associated monitored + # resource descriptor. For example, Cloud SQL databases use the labels " + # database_id" and "zone". + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + # Required. The monitored resource type. This field must match the type field of + # a MonitoredResourceDescriptor object. For example, the type of a Cloud SQL + # database is "cloudsql_database". + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @labels = args[:labels] if args.key?(:labels) + @type = args[:type] if args.key?(:type) + end + end + + # Describes a sink used to export log entries to one of the following + # destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a + # Cloud Pub/Sub topic. A logs filter controls which log entries are exported. + # The sink must be created within a project or organization. + class LogSink + include Google::Apis::Core::Hashable + + # Optional. The log entry format to use for this sink's exported log entries. + # The v2 format is used by default. The v1 format is deprecated and should be + # used only as part of a migration effort to v2. See Migration to the v2 API. + # Corresponds to the JSON property `outputVersionFormat` + # @return [String] + attr_accessor :output_version_format + + # Required. The client-assigned sink identifier, unique within the project. + # Example: "my-syslog-errors-to-pubsub". Sink identifiers are limited to 100 + # characters and can include only the following characters: upper and lower-case + # alphanumeric characters, underscores, hyphens, and periods. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Required. The export destination: + # "storage.googleapis.com/[GCS_BUCKET]" + # "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]" + # "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]" + # The sink's writer_identity, set when the sink is created, must have permission + # to write to the destination or else the log entries are not exported. For more + # information, see Exporting Logs With Sinks. + # Corresponds to the JSON property `destination` + # @return [String] + attr_accessor :destination + + # Optional. An advanced logs filter. The only exported log entries are those + # that are in the resource owning the sink and that match the filter. The filter + # must use the log entry format specified by the output_version_format parameter. + # For example, in the v2 format: + # logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR + # Corresponds to the JSON property `filter` + # @return [String] + attr_accessor :filter + + # Optional. The time at which this sink will stop exporting log entries. Log + # entries are exported only if their timestamp is earlier than the end time. If + # this field is not supplied, there is no end time. If both a start time and an + # end time are provided, then the end time must be later than the start time. + # Corresponds to the JSON property `endTime` + # @return [String] + attr_accessor :end_time + + # Optional. The time at which this sink will begin exporting log entries. Log + # entries are exported only if their timestamp is not earlier than the start + # time. The default value of this field is the time the sink is created or + # updated. + # Corresponds to the JSON property `startTime` + # @return [String] + attr_accessor :start_time + + # Output only. An IAM identity—a service account or group—under + # which Stackdriver Logging writes the exported log entries to the sink's + # destination. This field is set by sinks.create and sinks.update, based on the + # setting of unique_writer_identity in those methods.Until you grant this + # identity write-access to the destination, log entry exports from this sink + # will fail. For more information, see Granting access for a resource. Consult + # the destination service's documentation to determine the appropriate IAM roles + # to assign to the identity. + # Corresponds to the JSON property `writerIdentity` + # @return [String] + attr_accessor :writer_identity + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @output_version_format = args[:output_version_format] if args.key?(:output_version_format) + @name = args[:name] if args.key?(:name) + @destination = args[:destination] if args.key?(:destination) + @filter = args[:filter] if args.key?(:filter) + @end_time = args[:end_time] if args.key?(:end_time) + @start_time = args[:start_time] if args.key?(:start_time) + @writer_identity = args[:writer_identity] if args.key?(:writer_identity) + end + end + + # The parameters to WriteLogEntries. + class WriteLogEntriesRequest + include Google::Apis::Core::Hashable + + # Optional. A default log resource name that is assigned to all log entries in + # entries that do not specify a value for log_name: + # "projects/[PROJECT_ID]/logs/[LOG_ID]" + # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + # [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog" + # or "organizations/1234567890/logs/cloudresourcemanager.googleapis.com% + # 2Factivity". For more information about log names, see LogEntry. + # Corresponds to the JSON property `logName` + # @return [String] + attr_accessor :log_name + + # Required. The log entries to write. Values supplied for the fields log_name, + # resource, and labels in this entries.write request are added to those log + # entries that do not provide their own values for the fields.To improve + # throughput and to avoid exceeding the quota limit for calls to entries.write, + # you should write multiple log entries at once rather than calling this method + # for each individual log entry. + # Corresponds to the JSON property `entries` + # @return [Array] + attr_accessor :entries + + # Optional. Whether valid entries should be written even if some other entries + # fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any entry is not + # written, the response status will be the error associated with one of the + # failed entries and include error details in the form of + # WriteLogEntriesPartialErrors. + # Corresponds to the JSON property `partialSuccess` + # @return [Boolean] + attr_accessor :partial_success + alias_method :partial_success?, :partial_success + + # Optional. Default labels that are added to the labels field of all log entries + # in entries. If a log entry already has a label with the same key as a label in + # this parameter, then the log entry's label is not changed. See LogEntry. + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + # An object representing a resource that can be used for monitoring, logging, + # billing, or other purposes. Examples include virtual machine instances, + # databases, and storage devices such as disks. The type field identifies a + # MonitoredResourceDescriptor object that describes the resource's schema. + # Information in the labels field identifies the actual resource and its + # attributes according to the schema. For example, a particular Compute Engine + # VM instance could be represented by the following object, because the + # MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and " + # zone": + # ` "type": "gce_instance", + # "labels": ` "instance_id": "12345678901234", + # "zone": "us-central1-a" `` + # Corresponds to the JSON property `resource` + # @return [Google::Apis::LoggingV2beta1::MonitoredResource] + attr_accessor :resource + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @log_name = args[:log_name] if args.key?(:log_name) + @entries = args[:entries] if args.key?(:entries) + @partial_success = args[:partial_success] if args.key?(:partial_success) + @labels = args[:labels] if args.key?(:labels) + @resource = args[:resource] if args.key?(:resource) + end + end + + # Result returned from ListLogs. + class ListLogsResponse + include Google::Apis::Core::Hashable + + # A list of log names. For example, "projects/my-project/syslog" or " + # organizations/123/cloudresourcemanager.googleapis.com%2Factivity". + # Corresponds to the JSON property `logNames` + # @return [Array] + attr_accessor :log_names + + # If there might be more results than those appearing in this response, then + # nextPageToken is included. To get the next set of results, call this method + # again using the value of nextPageToken as pageToken. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @log_names = args[:log_names] if args.key?(:log_names) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # Result returned from ListSinks. + class ListSinksResponse + include Google::Apis::Core::Hashable + + # A list of sinks. + # Corresponds to the JSON property `sinks` + # @return [Array] + attr_accessor :sinks + + # If there might be more results than appear in this response, then + # nextPageToken is included. To get the next set of results, call the same + # method again using the value of nextPageToken as pageToken. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @sinks = args[:sinks] if args.key?(:sinks) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # A common proto for logging HTTP requests. Only contains semantics defined by + # the HTTP specification. Product-specific logging information MUST be defined + # in a separate message. + class HttpRequest + include Google::Apis::Core::Hashable + + # The size of the HTTP request message in bytes, including the request headers + # and the request body. + # Corresponds to the JSON property `requestSize` + # @return [String] + attr_accessor :request_size + + # The size of the HTTP response message sent back to the client, in bytes, + # including the response headers and the response body. + # Corresponds to the JSON property `responseSize` + # @return [String] + attr_accessor :response_size + + # The scheme (http, https), the host name, the path and the query portion of the + # URL that was requested. Example: "http://example.com/some/info?color=red". + # Corresponds to the JSON property `requestUrl` + # @return [String] + attr_accessor :request_url + + # The IP address (IPv4 or IPv6) of the client that issued the HTTP request. + # Examples: "192.168.1.1", "FE80::0202:B3FF:FE1E:8329". + # Corresponds to the JSON property `remoteIp` + # @return [String] + attr_accessor :remote_ip + + # The IP address (IPv4 or IPv6) of the origin server that the request was sent + # to. + # Corresponds to the JSON property `serverIp` + # @return [String] + attr_accessor :server_ip + + # Whether or not a cache lookup was attempted. + # Corresponds to the JSON property `cacheLookup` + # @return [Boolean] + attr_accessor :cache_lookup + alias_method :cache_lookup?, :cache_lookup + + # Whether or not an entity was served from cache (with or without validation). + # Corresponds to the JSON property `cacheHit` + # @return [Boolean] + attr_accessor :cache_hit + alias_method :cache_hit?, :cache_hit + + # Whether or not the response was validated with the origin server before being + # served from cache. This field is only meaningful if cache_hit is True. + # Corresponds to the JSON property `cacheValidatedWithOriginServer` + # @return [Boolean] + attr_accessor :cache_validated_with_origin_server + alias_method :cache_validated_with_origin_server?, :cache_validated_with_origin_server + + # The response code indicating the status of response. Examples: 200, 404. + # Corresponds to the JSON property `status` + # @return [Fixnum] + attr_accessor :status + + # The referer URL of the request, as defined in HTTP/1.1 Header Field + # Definitions (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). + # Corresponds to the JSON property `referer` + # @return [String] + attr_accessor :referer + + # The request processing latency on the server, from the time the request was + # received until the response was sent. + # Corresponds to the JSON property `latency` + # @return [String] + attr_accessor :latency + + # The user agent sent by the client. Example: "Mozilla/4.0 (compatible; MSIE 6.0; + # Windows 98; Q312461; .NET CLR 1.0.3705)". + # Corresponds to the JSON property `userAgent` + # @return [String] + attr_accessor :user_agent + + # The number of HTTP response bytes inserted into cache. Set only when a cache + # fill was attempted. + # Corresponds to the JSON property `cacheFillBytes` + # @return [String] + attr_accessor :cache_fill_bytes + + # The request method. Examples: "GET", "HEAD", "PUT", "POST". + # Corresponds to the JSON property `requestMethod` + # @return [String] + attr_accessor :request_method + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @request_size = args[:request_size] if args.key?(:request_size) + @response_size = args[:response_size] if args.key?(:response_size) + @request_url = args[:request_url] if args.key?(:request_url) + @remote_ip = args[:remote_ip] if args.key?(:remote_ip) + @server_ip = args[:server_ip] if args.key?(:server_ip) + @cache_lookup = args[:cache_lookup] if args.key?(:cache_lookup) + @cache_hit = args[:cache_hit] if args.key?(:cache_hit) + @cache_validated_with_origin_server = args[:cache_validated_with_origin_server] if args.key?(:cache_validated_with_origin_server) + @status = args[:status] if args.key?(:status) + @referer = args[:referer] if args.key?(:referer) + @latency = args[:latency] if args.key?(:latency) + @user_agent = args[:user_agent] if args.key?(:user_agent) + @cache_fill_bytes = args[:cache_fill_bytes] if args.key?(:cache_fill_bytes) + @request_method = args[:request_method] if args.key?(:request_method) + end + end + + # A description of a label. + class LabelDescriptor + include Google::Apis::Core::Hashable + + # A human-readable description for the label. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # The type of data that can be assigned to the label. + # Corresponds to the JSON property `valueType` + # @return [String] + attr_accessor :value_type + + # The label key. + # Corresponds to the JSON property `key` + # @return [String] + attr_accessor :key + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @description = args[:description] if args.key?(:description) + @value_type = args[:value_type] if args.key?(:value_type) + @key = args[:key] if args.key?(:key) + end + end + + # An object that describes the schema of a MonitoredResource object using a type + # name and a set of labels. For example, the monitored resource descriptor for + # Google Compute Engine VM instances has a type of "gce_instance" and specifies + # the use of the labels "instance_id" and "zone" to identify particular VM + # instances.Different APIs can support different monitored resource types. APIs + # generally provide a list method that returns the monitored resource + # descriptors used by the API. + class MonitoredResourceDescriptor + include Google::Apis::Core::Hashable + + # Required. The monitored resource type. For example, the type " + # cloudsql_database" represents databases in Google Cloud SQL. The maximum + # length of this value is 256 characters. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # Required. A set of labels used to describe instances of this monitored + # resource type. For example, an individual Google Cloud SQL database is + # identified by values for the labels "database_id" and "zone". + # Corresponds to the JSON property `labels` + # @return [Array] + attr_accessor :labels + + # Optional. The resource name of the monitored resource descriptor: "projects/` + # project_id`/monitoredResourceDescriptors/`type`" where `type` is the value of + # the type field in this object and `project_id` is a project ID that provides + # API-specific context for accessing the type. APIs that do not use project + # information can use the resource name format "monitoredResourceDescriptors/` + # type`". + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Optional. A concise name for the monitored resource type that might be + # displayed in user interfaces. It should be a Title Cased Noun Phrase, without + # any article or other determiners. For example, "Google Cloud SQL Database". + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # Optional. A detailed description of the monitored resource type that might be + # used in documentation. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @type = args[:type] if args.key?(:type) + @labels = args[:labels] if args.key?(:labels) + @name = args[:name] if args.key?(:name) + @display_name = args[:display_name] if args.key?(:display_name) + @description = args[:description] if args.key?(:description) + end + end + + # Additional information about the source code location that produced the log + # entry. + class LogEntrySourceLocation + include Google::Apis::Core::Hashable + + # Optional. Source file name. Depending on the runtime environment, this might + # be a simple name or a fully-qualified name. + # Corresponds to the JSON property `file` + # @return [String] + attr_accessor :file + + # Optional. Human-readable name of the function or method being invoked, with + # optional context such as the class or package name. This information may be + # used in contexts such as the logs viewer, where a file and line number are + # less meaningful. The format can vary by language. For example: qual.if.ied. + # Class.method (Java), dir/package.func (Go), function (Python). + # Corresponds to the JSON property `function` + # @return [String] + attr_accessor :function + + # Optional. Line within the source file. 1-based; 0 indicates no line number + # available. # Corresponds to the JSON property `line` # @return [String] attr_accessor :line @@ -1245,10 +1175,80 @@ module Google # Update properties of this object def update!(**args) @file = args[:file] if args.key?(:file) - @function_name = args[:function_name] if args.key?(:function_name) + @function = args[:function] if args.key?(:function) @line = args[:line] if args.key?(:line) end end + + # Result returned from ListLogEntries. + class ListLogEntriesResponse + include Google::Apis::Core::Hashable + + # A list of log entries. + # Corresponds to the JSON property `entries` + # @return [Array] + attr_accessor :entries + + # If there might be more results than those appearing in this response, then + # nextPageToken is included. To get the next set of results, call this method + # again using the value of nextPageToken as pageToken.If a value for + # next_page_token appears and the entries field is empty, it means that the + # search found no log entries so far but it did not have time to search all the + # possible log entries. Retry the method with this value for page_token to + # continue the search. Alternatively, consider speeding up the search by + # changing your filter to specify a single log name or resource type, or to + # narrow the time range of the search. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @entries = args[:entries] if args.key?(:entries) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # Application log line emitted while processing a request. + class LogLine + include Google::Apis::Core::Hashable + + # Severity of this log entry. + # Corresponds to the JSON property `severity` + # @return [String] + attr_accessor :severity + + # App-provided log message. + # Corresponds to the JSON property `logMessage` + # @return [String] + attr_accessor :log_message + + # Specifies a location in a source code file. + # Corresponds to the JSON property `sourceLocation` + # @return [Google::Apis::LoggingV2beta1::SourceLocation] + attr_accessor :source_location + + # Approximate time when this log entry was made. + # Corresponds to the JSON property `time` + # @return [String] + attr_accessor :time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @severity = args[:severity] if args.key?(:severity) + @log_message = args[:log_message] if args.key?(:log_message) + @source_location = args[:source_location] if args.key?(:source_location) + @time = args[:time] if args.key?(:time) + end + end end end end diff --git a/generated/google/apis/logging_v2beta1/representations.rb b/generated/google/apis/logging_v2beta1/representations.rb index 1db400cb2..95efd87ad 100644 --- a/generated/google/apis/logging_v2beta1/representations.rb +++ b/generated/google/apis/logging_v2beta1/representations.rb @@ -22,114 +22,6 @@ module Google module Apis module LoggingV2beta1 - class ListLogEntriesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class RequestLog - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListMonitoredResourceDescriptorsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SourceReference - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class LogMetric - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class WriteLogEntriesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class LogEntryOperation - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class MonitoredResource - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class WriteLogEntriesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class LogSink - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListLogsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListSinksResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class HttpRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class LabelDescriptor - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class MonitoredResourceDescriptor - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class LogEntrySourceLocation - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListLogEntriesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class LogLine - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class ListLogMetricsResponse class Representation < Google::Apis::Core::JsonRepresentation; end @@ -155,219 +47,111 @@ module Google end class ListLogEntriesRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :order_by, as: 'orderBy' - collection :resource_names, as: 'resourceNames' - collection :project_ids, as: 'projectIds' - property :filter, as: 'filter' - property :page_token, as: 'pageToken' - property :page_size, as: 'pageSize' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class RequestLog - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :url_map_entry, as: 'urlMapEntry' - property :instance_index, as: 'instanceIndex' - property :host, as: 'host' - property :finished, as: 'finished' - property :http_version, as: 'httpVersion' - property :start_time, as: 'startTime' - property :latency, as: 'latency' - property :ip, as: 'ip' - property :app_id, as: 'appId' - property :app_engine_release, as: 'appEngineRelease' - property :method_prop, as: 'method' - property :cost, as: 'cost' - property :instance_id, as: 'instanceId' - property :mega_cycles, as: 'megaCycles' - property :first, as: 'first' - property :version_id, as: 'versionId' - property :module_id, as: 'moduleId' - property :end_time, as: 'endTime' - property :user_agent, as: 'userAgent' - property :was_loading_request, as: 'wasLoadingRequest' - collection :source_reference, as: 'sourceReference', class: Google::Apis::LoggingV2beta1::SourceReference, decorator: Google::Apis::LoggingV2beta1::SourceReference::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :response_size, as: 'responseSize' - property :trace_id, as: 'traceId' - collection :line, as: 'line', class: Google::Apis::LoggingV2beta1::LogLine, decorator: Google::Apis::LoggingV2beta1::LogLine::Representation - - property :task_queue_name, as: 'taskQueueName' - property :referrer, as: 'referrer' - property :request_id, as: 'requestId' - property :nickname, as: 'nickname' - property :status, as: 'status' - property :resource, as: 'resource' - property :pending_time, as: 'pendingTime' - property :task_name, as: 'taskName' - end + include Google::Apis::Core::JsonObjectSupport end class ListMonitoredResourceDescriptorsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - collection :resource_descriptors, as: 'resourceDescriptors', class: Google::Apis::LoggingV2beta1::MonitoredResourceDescriptor, decorator: Google::Apis::LoggingV2beta1::MonitoredResourceDescriptor::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class SourceReference - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :repository, as: 'repository' - property :revision_id, as: 'revisionId' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class LogMetric - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :filter, as: 'filter' - property :name, as: 'name' - property :description, as: 'description' - property :version, as: 'version' - end - end + class Representation < Google::Apis::Core::JsonRepresentation; end - class WriteLogEntriesResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end + include Google::Apis::Core::JsonObjectSupport end class LogEntryOperation - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :producer, as: 'producer' - property :first, as: 'first' - property :last, as: 'last' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class WriteLogEntriesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class MonitoredResource - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :type, as: 'type' - hash :labels, as: 'labels' - end - end + class Representation < Google::Apis::Core::JsonRepresentation; end - class WriteLogEntriesRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :log_name, as: 'logName' - collection :entries, as: 'entries', class: Google::Apis::LoggingV2beta1::LogEntry, decorator: Google::Apis::LoggingV2beta1::LogEntry::Representation - - property :partial_success, as: 'partialSuccess' - hash :labels, as: 'labels' - property :resource, as: 'resource', class: Google::Apis::LoggingV2beta1::MonitoredResource, decorator: Google::Apis::LoggingV2beta1::MonitoredResource::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class LogSink - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :start_time, as: 'startTime' - property :writer_identity, as: 'writerIdentity' - property :output_version_format, as: 'outputVersionFormat' - property :name, as: 'name' - property :destination, as: 'destination' - property :filter, as: 'filter' - property :end_time, as: 'endTime' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class WriteLogEntriesRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class ListLogsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - collection :log_names, as: 'logNames' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class ListSinksResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :sinks, as: 'sinks', class: Google::Apis::LoggingV2beta1::LogSink, decorator: Google::Apis::LoggingV2beta1::LogSink::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :next_page_token, as: 'nextPageToken' - end + include Google::Apis::Core::JsonObjectSupport end class HttpRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :latency, as: 'latency' - property :user_agent, as: 'userAgent' - property :cache_fill_bytes, as: 'cacheFillBytes' - property :request_method, as: 'requestMethod' - property :request_size, as: 'requestSize' - property :response_size, as: 'responseSize' - property :request_url, as: 'requestUrl' - property :remote_ip, as: 'remoteIp' - property :server_ip, as: 'serverIp' - property :cache_lookup, as: 'cacheLookup' - property :cache_hit, as: 'cacheHit' - property :cache_validated_with_origin_server, as: 'cacheValidatedWithOriginServer' - property :status, as: 'status' - property :referer, as: 'referer' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class LabelDescriptor - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :key, as: 'key' - property :description, as: 'description' - property :value_type, as: 'valueType' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class MonitoredResourceDescriptor - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :type, as: 'type' - collection :labels, as: 'labels', class: Google::Apis::LoggingV2beta1::LabelDescriptor, decorator: Google::Apis::LoggingV2beta1::LabelDescriptor::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :name, as: 'name' - property :display_name, as: 'displayName' - property :description, as: 'description' - end + include Google::Apis::Core::JsonObjectSupport end class LogEntrySourceLocation - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :file, as: 'file' - property :function, as: 'function' - property :line, as: 'line' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class ListLogEntriesResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - collection :entries, as: 'entries', class: Google::Apis::LoggingV2beta1::LogEntry, decorator: Google::Apis::LoggingV2beta1::LogEntry::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class LogLine - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :severity, as: 'severity' - property :log_message, as: 'logMessage' - property :source_location, as: 'sourceLocation', class: Google::Apis::LoggingV2beta1::SourceLocation, decorator: Google::Apis::LoggingV2beta1::SourceLocation::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :time, as: 'time' - end + include Google::Apis::Core::JsonObjectSupport end class ListLogMetricsResponse @@ -411,11 +195,227 @@ module Google class SourceLocation # @private class Representation < Google::Apis::Core::JsonRepresentation + property :line, as: 'line' property :file, as: 'file' property :function_name, as: 'functionName' + end + end + + class ListLogEntriesRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :project_ids, as: 'projectIds' + property :filter, as: 'filter' + property :page_token, as: 'pageToken' + property :page_size, as: 'pageSize' + property :order_by, as: 'orderBy' + collection :resource_names, as: 'resourceNames' + end + end + + class RequestLog + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :nickname, as: 'nickname' + property :status, as: 'status' + property :resource, as: 'resource' + property :pending_time, as: 'pendingTime' + property :task_name, as: 'taskName' + property :url_map_entry, as: 'urlMapEntry' + property :instance_index, as: 'instanceIndex' + property :host, as: 'host' + property :finished, as: 'finished' + property :http_version, as: 'httpVersion' + property :start_time, as: 'startTime' + property :latency, as: 'latency' + property :ip, as: 'ip' + property :app_id, as: 'appId' + property :app_engine_release, as: 'appEngineRelease' + property :method_prop, as: 'method' + property :cost, as: 'cost' + property :instance_id, as: 'instanceId' + property :mega_cycles, as: 'megaCycles' + property :first, as: 'first' + property :version_id, as: 'versionId' + property :module_id, as: 'moduleId' + property :end_time, as: 'endTime' + property :user_agent, as: 'userAgent' + property :was_loading_request, as: 'wasLoadingRequest' + collection :source_reference, as: 'sourceReference', class: Google::Apis::LoggingV2beta1::SourceReference, decorator: Google::Apis::LoggingV2beta1::SourceReference::Representation + + property :response_size, as: 'responseSize' + property :trace_id, as: 'traceId' + collection :line, as: 'line', class: Google::Apis::LoggingV2beta1::LogLine, decorator: Google::Apis::LoggingV2beta1::LogLine::Representation + + property :task_queue_name, as: 'taskQueueName' + property :referrer, as: 'referrer' + property :request_id, as: 'requestId' + end + end + + class ListMonitoredResourceDescriptorsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :resource_descriptors, as: 'resourceDescriptors', class: Google::Apis::LoggingV2beta1::MonitoredResourceDescriptor, decorator: Google::Apis::LoggingV2beta1::MonitoredResourceDescriptor::Representation + + end + end + + class SourceReference + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :repository, as: 'repository' + property :revision_id, as: 'revisionId' + end + end + + class LogMetric + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :name, as: 'name' + property :description, as: 'description' + property :version, as: 'version' + property :filter, as: 'filter' + end + end + + class LogEntryOperation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :id, as: 'id' + property :producer, as: 'producer' + property :first, as: 'first' + property :last, as: 'last' + end + end + + class WriteLogEntriesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class MonitoredResource + # @private + class Representation < Google::Apis::Core::JsonRepresentation + hash :labels, as: 'labels' + property :type, as: 'type' + end + end + + class LogSink + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :output_version_format, as: 'outputVersionFormat' + property :name, as: 'name' + property :destination, as: 'destination' + property :filter, as: 'filter' + property :end_time, as: 'endTime' + property :start_time, as: 'startTime' + property :writer_identity, as: 'writerIdentity' + end + end + + class WriteLogEntriesRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :log_name, as: 'logName' + collection :entries, as: 'entries', class: Google::Apis::LoggingV2beta1::LogEntry, decorator: Google::Apis::LoggingV2beta1::LogEntry::Representation + + property :partial_success, as: 'partialSuccess' + hash :labels, as: 'labels' + property :resource, as: 'resource', class: Google::Apis::LoggingV2beta1::MonitoredResource, decorator: Google::Apis::LoggingV2beta1::MonitoredResource::Representation + + end + end + + class ListLogsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :log_names, as: 'logNames' + property :next_page_token, as: 'nextPageToken' + end + end + + class ListSinksResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :sinks, as: 'sinks', class: Google::Apis::LoggingV2beta1::LogSink, decorator: Google::Apis::LoggingV2beta1::LogSink::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class HttpRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :request_size, as: 'requestSize' + property :response_size, as: 'responseSize' + property :request_url, as: 'requestUrl' + property :remote_ip, as: 'remoteIp' + property :server_ip, as: 'serverIp' + property :cache_lookup, as: 'cacheLookup' + property :cache_hit, as: 'cacheHit' + property :cache_validated_with_origin_server, as: 'cacheValidatedWithOriginServer' + property :status, as: 'status' + property :referer, as: 'referer' + property :latency, as: 'latency' + property :user_agent, as: 'userAgent' + property :cache_fill_bytes, as: 'cacheFillBytes' + property :request_method, as: 'requestMethod' + end + end + + class LabelDescriptor + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :description, as: 'description' + property :value_type, as: 'valueType' + property :key, as: 'key' + end + end + + class MonitoredResourceDescriptor + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :type, as: 'type' + collection :labels, as: 'labels', class: Google::Apis::LoggingV2beta1::LabelDescriptor, decorator: Google::Apis::LoggingV2beta1::LabelDescriptor::Representation + + property :name, as: 'name' + property :display_name, as: 'displayName' + property :description, as: 'description' + end + end + + class LogEntrySourceLocation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :file, as: 'file' + property :function, as: 'function' property :line, as: 'line' end end + + class ListLogEntriesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :entries, as: 'entries', class: Google::Apis::LoggingV2beta1::LogEntry, decorator: Google::Apis::LoggingV2beta1::LogEntry::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class LogLine + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :severity, as: 'severity' + property :log_message, as: 'logMessage' + property :source_location, as: 'sourceLocation', class: Google::Apis::LoggingV2beta1::SourceLocation, decorator: Google::Apis::LoggingV2beta1::SourceLocation::Representation + + property :time, as: 'time' + end + end end end end diff --git a/generated/google/apis/logging_v2beta1/service.rb b/generated/google/apis/logging_v2beta1/service.rb index ee10d2a3a..325294921 100644 --- a/generated/google/apis/logging_v2beta1/service.rb +++ b/generated/google/apis/logging_v2beta1/service.rb @@ -32,16 +32,16 @@ module Google # # @see https://cloud.google.com/logging/docs/ class LoggingService < Google::Apis::Core::BaseService - # @return [String] - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - attr_accessor :quota_user - # @return [String] # API key. Your API key identifies your project and provides you with API access, # quota, and reports. Required unless you provide an OAuth 2.0 token. attr_accessor :key + # @return [String] + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + attr_accessor :quota_user + def initialize super('https://logging.googleapis.com/', '') end @@ -55,11 +55,11 @@ module Google # [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog" # , "organizations/1234567890/logs/cloudresourcemanager.googleapis.com% # 2Factivity". For more information about log names, see LogEntry. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -72,13 +72,13 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_organization_log(log_name, quota_user: nil, fields: nil, options: nil, &block) + def delete_billing_account_log(log_name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v2beta1/{+logName}', options) command.response_representation = Google::Apis::LoggingV2beta1::Empty::Representation command.response_class = Google::Apis::LoggingV2beta1::Empty command.params['logName'] = log_name unless log_name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -97,11 +97,11 @@ module Google # preceding call to this method. pageToken must be the value of nextPageToken # from the previous response. The values of other method parameters should be # identical to those in the previous call. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -114,187 +114,19 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_organization_logs(parent, page_size: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block) + def list_billing_account_logs(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2beta1/{+parent}/logs', options) command.response_representation = Google::Apis::LoggingV2beta1::ListLogsResponse::Representation command.response_class = Google::Apis::LoggingV2beta1::ListLogsResponse command.params['parent'] = parent unless parent.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end - # Lists log entries. Use this method to retrieve log entries from Stackdriver - # Logging. For ways to export log entries, see Exporting Logs. - # @param [Google::Apis::LoggingV2beta1::ListLogEntriesRequest] list_log_entries_request_object - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::LoggingV2beta1::ListLogEntriesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV2beta1::ListLogEntriesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_entry_log_entries(list_log_entries_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v2beta1/entries:list', options) - command.request_representation = Google::Apis::LoggingV2beta1::ListLogEntriesRequest::Representation - command.request_object = list_log_entries_request_object - command.response_representation = Google::Apis::LoggingV2beta1::ListLogEntriesResponse::Representation - command.response_class = Google::Apis::LoggingV2beta1::ListLogEntriesResponse - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Writes log entries to Stackdriver Logging. All log entries are written by this - # method. - # @param [Google::Apis::LoggingV2beta1::WriteLogEntriesRequest] write_log_entries_request_object - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::LoggingV2beta1::WriteLogEntriesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV2beta1::WriteLogEntriesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def write_entry_log_entries(write_log_entries_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v2beta1/entries:write', options) - command.request_representation = Google::Apis::LoggingV2beta1::WriteLogEntriesRequest::Representation - command.request_object = write_log_entries_request_object - command.response_representation = Google::Apis::LoggingV2beta1::WriteLogEntriesResponse::Representation - command.response_class = Google::Apis::LoggingV2beta1::WriteLogEntriesResponse - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Creates or updates a logs-based metric. - # @param [String] metric_name - # The resource name of the metric to update: - # "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - # The updated metric must be provided in the request and it's name field must be - # the same as [METRIC_ID] If the metric does not exist in [PROJECT_ID], then a - # new metric is created. - # @param [Google::Apis::LoggingV2beta1::LogMetric] log_metric_object - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::LoggingV2beta1::LogMetric] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV2beta1::LogMetric] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_project_metric(metric_name, log_metric_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:put, 'v2beta1/{+metricName}', options) - command.request_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation - command.request_object = log_metric_object - command.response_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation - command.response_class = Google::Apis::LoggingV2beta1::LogMetric - command.params['metricName'] = metric_name unless metric_name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Creates a logs-based metric. - # @param [String] parent - # The resource name of the project in which to create the metric: - # "projects/[PROJECT_ID]" - # The new metric must be provided in the request. - # @param [Google::Apis::LoggingV2beta1::LogMetric] log_metric_object - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::LoggingV2beta1::LogMetric] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV2beta1::LogMetric] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_project_metric(parent, log_metric_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v2beta1/{+parent}/metrics', options) - command.request_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation - command.request_object = log_metric_object - command.response_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation - command.response_class = Google::Apis::LoggingV2beta1::LogMetric - command.params['parent'] = parent unless parent.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Deletes a logs-based metric. - # @param [String] metric_name - # The resource name of the metric to delete: - # "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::LoggingV2beta1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV2beta1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_project_metric(metric_name, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:delete, 'v2beta1/{+metricName}', options) - command.response_representation = Google::Apis::LoggingV2beta1::Empty::Representation - command.response_class = Google::Apis::LoggingV2beta1::Empty - command.params['metricName'] = metric_name unless metric_name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Lists logs-based metrics. - # @param [String] parent - # Required. The name of the project containing the metrics: - # "projects/[PROJECT_ID]" + # Lists the descriptors for monitored resource types used by Stackdriver Logging. # @param [String] page_token # Optional. If present, then retrieve the next batch of results from the # preceding call to this method. pageToken must be the value of nextPageToken @@ -304,63 +136,75 @@ module Google # Optional. The maximum number of results to return from this request. Non- # positive values are ignored. The presence of nextPageToken in the response # indicates that more results might be available. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::LoggingV2beta1::ListLogMetricsResponse] parsed result object + # @yieldparam result [Google::Apis::LoggingV2beta1::ListMonitoredResourceDescriptorsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::LoggingV2beta1::ListLogMetricsResponse] + # @return [Google::Apis::LoggingV2beta1::ListMonitoredResourceDescriptorsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_project_metrics(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v2beta1/{+parent}/metrics', options) - command.response_representation = Google::Apis::LoggingV2beta1::ListLogMetricsResponse::Representation - command.response_class = Google::Apis::LoggingV2beta1::ListLogMetricsResponse - command.params['parent'] = parent unless parent.nil? + def list_monitored_resource_descriptors(page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2beta1/monitoredResourceDescriptors', options) + command.response_representation = Google::Apis::LoggingV2beta1::ListMonitoredResourceDescriptorsResponse::Representation + command.response_class = Google::Apis::LoggingV2beta1::ListMonitoredResourceDescriptorsResponse command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end - # Gets a logs-based metric. - # @param [String] metric_name - # The resource name of the desired metric: - # "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + # Lists the logs in projects or organizations. Only logs that have entries are + # listed. + # @param [String] parent + # Required. The resource name that owns the logs: + # "projects/[PROJECT_ID]" + # "organizations/[ORGANIZATION_ID]" + # @param [String] page_token + # Optional. If present, then retrieve the next batch of results from the + # preceding call to this method. pageToken must be the value of nextPageToken + # from the previous response. The values of other method parameters should be + # identical to those in the previous call. + # @param [Fixnum] page_size + # Optional. The maximum number of results to return from this request. Non- + # positive values are ignored. The presence of nextPageToken in the response + # indicates that more results might be available. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::LoggingV2beta1::LogMetric] parsed result object + # @yieldparam result [Google::Apis::LoggingV2beta1::ListLogsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::LoggingV2beta1::LogMetric] + # @return [Google::Apis::LoggingV2beta1::ListLogsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_project_metric(metric_name, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v2beta1/{+metricName}', options) - command.response_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation - command.response_class = Google::Apis::LoggingV2beta1::LogMetric - command.params['metricName'] = metric_name unless metric_name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? + def list_organization_logs(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2beta1/{+parent}/logs', options) + command.response_representation = Google::Apis::LoggingV2beta1::ListLogsResponse::Representation + command.response_class = Google::Apis::LoggingV2beta1::ListLogsResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -373,11 +217,11 @@ module Google # [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog" # , "organizations/1234567890/logs/cloudresourcemanager.googleapis.com% # 2Factivity". For more information about log names, see LogEntry. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -390,13 +234,75 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_log(log_name, quota_user: nil, fields: nil, options: nil, &block) + def delete_organization_log(log_name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v2beta1/{+logName}', options) command.response_representation = Google::Apis::LoggingV2beta1::Empty::Representation command.response_class = Google::Apis::LoggingV2beta1::Empty command.params['logName'] = log_name unless log_name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists log entries. Use this method to retrieve log entries from Stackdriver + # Logging. For ways to export log entries, see Exporting Logs. + # @param [Google::Apis::LoggingV2beta1::ListLogEntriesRequest] list_log_entries_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::LoggingV2beta1::ListLogEntriesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::LoggingV2beta1::ListLogEntriesResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_entry_log_entries(list_log_entries_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2beta1/entries:list', options) + command.request_representation = Google::Apis::LoggingV2beta1::ListLogEntriesRequest::Representation + command.request_object = list_log_entries_request_object + command.response_representation = Google::Apis::LoggingV2beta1::ListLogEntriesResponse::Representation + command.response_class = Google::Apis::LoggingV2beta1::ListLogEntriesResponse + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Writes log entries to Stackdriver Logging. All log entries are written by this + # method. + # @param [Google::Apis::LoggingV2beta1::WriteLogEntriesRequest] write_log_entries_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::LoggingV2beta1::WriteLogEntriesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::LoggingV2beta1::WriteLogEntriesResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def write_entry_log_entries(write_log_entries_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2beta1/entries:write', options) + command.request_representation = Google::Apis::LoggingV2beta1::WriteLogEntriesRequest::Representation + command.request_object = write_log_entries_request_object + command.response_representation = Google::Apis::LoggingV2beta1::WriteLogEntriesResponse::Representation + command.response_class = Google::Apis::LoggingV2beta1::WriteLogEntriesResponse + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -415,11 +321,11 @@ module Google # Optional. The maximum number of results to return from this request. Non- # positive values are ignored. The presence of nextPageToken in the response # indicates that more results might be available. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -432,32 +338,32 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_logs(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) + def list_logs(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2beta1/{+parent}/logs', options) command.response_representation = Google::Apis::LoggingV2beta1::ListLogsResponse::Representation command.response_class = Google::Apis::LoggingV2beta1::ListLogsResponse command.params['parent'] = parent unless parent.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end - # Deletes a sink. If the sink has a unique writer_identity, then that service - # account is also deleted. - # @param [String] sink_name - # Required. The full resource name of the sink to delete, including the parent - # resource and the sink identifier: - # "projects/[PROJECT_ID]/sinks/[SINK_ID]" - # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - # It is an error if the sink does not exist. Example: "projects/my-project-id/ - # sinks/my-sink-id". It is an error if the sink does not exist. + # Deletes all the log entries in a log. The log reappears if it receives new + # entries. + # @param [String] log_name + # Required. The resource name of the log to delete: + # "projects/[PROJECT_ID]/logs/[LOG_ID]" + # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + # [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog" + # , "organizations/1234567890/logs/cloudresourcemanager.googleapis.com% + # 2Factivity". For more information about log names, see LogEntry. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -470,13 +376,49 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_project_sink(sink_name, quota_user: nil, fields: nil, options: nil, &block) + def delete_log(log_name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v2beta1/{+logName}', options) + command.response_representation = Google::Apis::LoggingV2beta1::Empty::Representation + command.response_class = Google::Apis::LoggingV2beta1::Empty + command.params['logName'] = log_name unless log_name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a sink. If the sink has a unique writer_identity, then that service + # account is also deleted. + # @param [String] sink_name + # Required. The full resource name of the sink to delete, including the parent + # resource and the sink identifier: + # "projects/[PROJECT_ID]/sinks/[SINK_ID]" + # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + # It is an error if the sink does not exist. Example: "projects/my-project-id/ + # sinks/my-sink-id". It is an error if the sink does not exist. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::LoggingV2beta1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::LoggingV2beta1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_project_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v2beta1/{+sinkName}', options) command.response_representation = Google::Apis::LoggingV2beta1::Empty::Representation command.response_class = Google::Apis::LoggingV2beta1::Empty command.params['sinkName'] = sink_name unless sink_name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -493,11 +435,11 @@ module Google # Optional. The maximum number of results to return from this request. Non- # positive values are ignored. The presence of nextPageToken in the response # indicates that more results might be available. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -510,15 +452,15 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_project_sinks(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) + def list_project_sinks(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2beta1/{+parent}/sinks', options) command.response_representation = Google::Apis::LoggingV2beta1::ListSinksResponse::Representation command.response_class = Google::Apis::LoggingV2beta1::ListSinksResponse command.params['parent'] = parent unless parent.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -528,11 +470,11 @@ module Google # "projects/[PROJECT_ID]/sinks/[SINK_ID]" # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" # Example: "projects/my-project-id/sinks/my-sink-id". + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -545,13 +487,13 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_project_sink(sink_name, quota_user: nil, fields: nil, options: nil, &block) + def get_project_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2beta1/{+sinkName}', options) command.response_representation = Google::Apis::LoggingV2beta1::LogSink::Representation command.response_class = Google::Apis::LoggingV2beta1::LogSink command.params['sinkName'] = sink_name unless sink_name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -577,11 +519,11 @@ module Google # If the old value was false and the new value is true, then writer_identity is # changed to a unique service account. # It is an error if the old value was true and the new value is false. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -594,7 +536,7 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_project_sink(sink_name, log_sink_object = nil, unique_writer_identity: nil, quota_user: nil, fields: nil, options: nil, &block) + def update_project_sink(sink_name, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:put, 'v2beta1/{+sinkName}', options) command.request_representation = Google::Apis::LoggingV2beta1::LogSink::Representation command.request_object = log_sink_object @@ -602,8 +544,8 @@ module Google command.response_class = Google::Apis::LoggingV2beta1::LogSink command.params['sinkName'] = sink_name unless sink_name.nil? command.query['uniqueWriterIdentity'] = unique_writer_identity unless unique_writer_identity.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -628,11 +570,11 @@ module Google # resource such as an organization, then the value of writer_identity will be a # unique service account used only for exports from the new sink. For more # information, see writer_identity in LogSink. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -645,7 +587,7 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_project_sink(parent, log_sink_object = nil, unique_writer_identity: nil, quota_user: nil, fields: nil, options: nil, &block) + def create_project_sink(parent, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2beta1/{+parent}/sinks', options) command.request_representation = Google::Apis::LoggingV2beta1::LogSink::Representation command.request_object = log_sink_object @@ -653,25 +595,20 @@ module Google command.response_class = Google::Apis::LoggingV2beta1::LogSink command.params['parent'] = parent unless parent.nil? command.query['uniqueWriterIdentity'] = unique_writer_identity unless unique_writer_identity.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end - # Deletes all the log entries in a log. The log reappears if it receives new - # entries. - # @param [String] log_name - # Required. The resource name of the log to delete: - # "projects/[PROJECT_ID]/logs/[LOG_ID]" - # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" - # [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog" - # , "organizations/1234567890/logs/cloudresourcemanager.googleapis.com% - # 2Factivity". For more information about log names, see LogEntry. + # Deletes a logs-based metric. + # @param [String] metric_name + # The resource name of the metric to delete: + # "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -684,22 +621,20 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_billing_account_log(log_name, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:delete, 'v2beta1/{+logName}', options) + def delete_project_metric(metric_name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v2beta1/{+metricName}', options) command.response_representation = Google::Apis::LoggingV2beta1::Empty::Representation command.response_class = Google::Apis::LoggingV2beta1::Empty - command.params['logName'] = log_name unless log_name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? + command.params['metricName'] = metric_name unless metric_name.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end - # Lists the logs in projects or organizations. Only logs that have entries are - # listed. + # Lists logs-based metrics. # @param [String] parent - # Required. The resource name that owns the logs: + # Required. The name of the project containing the metrics: # "projects/[PROJECT_ID]" - # "organizations/[ORGANIZATION_ID]" # @param [String] page_token # Optional. If present, then retrieve the next batch of results from the # preceding call to this method. pageToken must be the value of nextPageToken @@ -709,78 +644,143 @@ module Google # Optional. The maximum number of results to return from this request. Non- # positive values are ignored. The presence of nextPageToken in the response # indicates that more results might be available. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::LoggingV2beta1::ListLogsResponse] parsed result object + # @yieldparam result [Google::Apis::LoggingV2beta1::ListLogMetricsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::LoggingV2beta1::ListLogsResponse] + # @return [Google::Apis::LoggingV2beta1::ListLogMetricsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_billing_account_logs(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v2beta1/{+parent}/logs', options) - command.response_representation = Google::Apis::LoggingV2beta1::ListLogsResponse::Representation - command.response_class = Google::Apis::LoggingV2beta1::ListLogsResponse + def list_project_metrics(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2beta1/{+parent}/metrics', options) + command.response_representation = Google::Apis::LoggingV2beta1::ListLogMetricsResponse::Representation + command.response_class = Google::Apis::LoggingV2beta1::ListLogMetricsResponse command.params['parent'] = parent unless parent.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end - # Lists the descriptors for monitored resource types used by Stackdriver Logging. - # @param [String] page_token - # Optional. If present, then retrieve the next batch of results from the - # preceding call to this method. pageToken must be the value of nextPageToken - # from the previous response. The values of other method parameters should be - # identical to those in the previous call. - # @param [Fixnum] page_size - # Optional. The maximum number of results to return from this request. Non- - # positive values are ignored. The presence of nextPageToken in the response - # indicates that more results might be available. + # Gets a logs-based metric. + # @param [String] metric_name + # The resource name of the desired metric: + # "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::LoggingV2beta1::ListMonitoredResourceDescriptorsResponse] parsed result object + # @yieldparam result [Google::Apis::LoggingV2beta1::LogMetric] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::LoggingV2beta1::ListMonitoredResourceDescriptorsResponse] + # @return [Google::Apis::LoggingV2beta1::LogMetric] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_monitored_resource_descriptors(page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v2beta1/monitoredResourceDescriptors', options) - command.response_representation = Google::Apis::LoggingV2beta1::ListMonitoredResourceDescriptorsResponse::Representation - command.response_class = Google::Apis::LoggingV2beta1::ListMonitoredResourceDescriptorsResponse - command.query['pageToken'] = page_token unless page_token.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? + def get_project_metric(metric_name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2beta1/{+metricName}', options) + command.response_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation + command.response_class = Google::Apis::LoggingV2beta1::LogMetric + command.params['metricName'] = metric_name unless metric_name.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates or updates a logs-based metric. + # @param [String] metric_name + # The resource name of the metric to update: + # "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + # The updated metric must be provided in the request and it's name field must be + # the same as [METRIC_ID] If the metric does not exist in [PROJECT_ID], then a + # new metric is created. + # @param [Google::Apis::LoggingV2beta1::LogMetric] log_metric_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::LoggingV2beta1::LogMetric] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::LoggingV2beta1::LogMetric] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_project_metric(metric_name, log_metric_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:put, 'v2beta1/{+metricName}', options) + command.request_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation + command.request_object = log_metric_object + command.response_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation + command.response_class = Google::Apis::LoggingV2beta1::LogMetric + command.params['metricName'] = metric_name unless metric_name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a logs-based metric. + # @param [String] parent + # The resource name of the project in which to create the metric: + # "projects/[PROJECT_ID]" + # The new metric must be provided in the request. + # @param [Google::Apis::LoggingV2beta1::LogMetric] log_metric_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::LoggingV2beta1::LogMetric] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::LoggingV2beta1::LogMetric] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_project_metric(parent, log_metric_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2beta1/{+parent}/metrics', options) + command.request_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation + command.request_object = log_metric_object + command.response_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation + command.response_class = Google::Apis::LoggingV2beta1::LogMetric + command.params['parent'] = parent unless parent.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end protected def apply_command_defaults(command) - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['key'] = key unless key.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? end end end diff --git a/generated/google/apis/monitoring_v3.rb b/generated/google/apis/monitoring_v3.rb index 5b4a77aa7..a031af07a 100644 --- a/generated/google/apis/monitoring_v3.rb +++ b/generated/google/apis/monitoring_v3.rb @@ -27,7 +27,7 @@ module Google # @see https://cloud.google.com/monitoring/api/ module MonitoringV3 VERSION = 'V3' - REVISION = '20170114' + REVISION = '20170120' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/sheets_v4.rb b/generated/google/apis/sheets_v4.rb index 220a5b792..72ed02684 100644 --- a/generated/google/apis/sheets_v4.rb +++ b/generated/google/apis/sheets_v4.rb @@ -27,15 +27,15 @@ module Google VERSION = 'V4' REVISION = '20170117' + # View and manage the files in your Google Drive + AUTH_DRIVE = 'https://www.googleapis.com/auth/drive' + # View the files in your Google Drive AUTH_DRIVE_READONLY = 'https://www.googleapis.com/auth/drive.readonly' # View your Google Spreadsheets AUTH_SPREADSHEETS_READONLY = 'https://www.googleapis.com/auth/spreadsheets.readonly' - # View and manage the files in your Google Drive - AUTH_DRIVE = 'https://www.googleapis.com/auth/drive' - # View and manage your spreadsheets in Google Drive AUTH_SPREADSHEETS = 'https://www.googleapis.com/auth/spreadsheets' end diff --git a/generated/google/apis/sheets_v4/classes.rb b/generated/google/apis/sheets_v4/classes.rb index 5c2a0c09e..1d0533798 100644 --- a/generated/google/apis/sheets_v4/classes.rb +++ b/generated/google/apis/sheets_v4/classes.rb @@ -22,617 +22,39 @@ module Google module Apis module SheetsV4 - # The result of adding a named range. - class AddNamedRangeResponse - include Google::Apis::Core::Hashable - - # A named range. - # Corresponds to the JSON property `namedRange` - # @return [Google::Apis::SheetsV4::NamedRange] - attr_accessor :named_range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @named_range = args[:named_range] if args.key?(:named_range) - end - end - - # Updates an existing protected range with the specified - # protectedRangeId. - class UpdateProtectedRangeRequest - include Google::Apis::Core::Hashable - - # A protected range. - # Corresponds to the JSON property `protectedRange` - # @return [Google::Apis::SheetsV4::ProtectedRange] - attr_accessor :protected_range - - # The fields that should be updated. At least one field must be specified. - # The root `protectedRange` is implied and should not be specified. - # A single `"*"` can be used as short-hand for listing every field. - # Corresponds to the JSON property `fields` - # @return [String] - attr_accessor :fields - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @protected_range = args[:protected_range] if args.key?(:protected_range) - @fields = args[:fields] if args.key?(:fields) - end - end - - # The amount of padding around the cell, in pixels. - # When updating padding, every field must be specified. - class Padding - include Google::Apis::Core::Hashable - - # The right padding of the cell. - # Corresponds to the JSON property `right` - # @return [Fixnum] - attr_accessor :right - - # The left padding of the cell. - # Corresponds to the JSON property `left` - # @return [Fixnum] - attr_accessor :left - - # The top padding of the cell. - # Corresponds to the JSON property `top` - # @return [Fixnum] - attr_accessor :top - - # The bottom padding of the cell. - # Corresponds to the JSON property `bottom` - # @return [Fixnum] - attr_accessor :bottom - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @right = args[:right] if args.key?(:right) - @left = args[:left] if args.key?(:left) - @top = args[:top] if args.key?(:top) - @bottom = args[:bottom] if args.key?(:bottom) - end - end - - # Merges all cells in the range. - class MergeCellsRequest - include Google::Apis::Core::Hashable - - # How the cells should be merged. - # Corresponds to the JSON property `mergeType` - # @return [String] - attr_accessor :merge_type - - # A range on a sheet. - # All indexes are zero-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if `"Sheet1"` is sheet ID 0, then: - # `Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1` - # `Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1 == sheet_id:0` - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as `#REF!`. - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV4::GridRange] - attr_accessor :range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @merge_type = args[:merge_type] if args.key?(:merge_type) - @range = args[:range] if args.key?(:range) - end - end - - # The result of adding a sheet. - class AddSheetResponse - include Google::Apis::Core::Hashable - - # Properties of a sheet. - # Corresponds to the JSON property `properties` - # @return [Google::Apis::SheetsV4::SheetProperties] - attr_accessor :properties - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @properties = args[:properties] if args.key?(:properties) - end - end - - # Metadata about a value in a pivot grouping. - class PivotGroupValueMetadata - include Google::Apis::Core::Hashable - - # The kinds of value that a cell in a spreadsheet can have. - # Corresponds to the JSON property `value` - # @return [Google::Apis::SheetsV4::ExtendedValue] - attr_accessor :value - - # True if the data corresponding to the value is collapsed. - # Corresponds to the JSON property `collapsed` - # @return [Boolean] - attr_accessor :collapsed - alias_method :collapsed?, :collapsed - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @value = args[:value] if args.key?(:value) - @collapsed = args[:collapsed] if args.key?(:collapsed) - end - end - - # The result of updating an embedded object's position. - class UpdateEmbeddedObjectPositionResponse - include Google::Apis::Core::Hashable - - # The position of an embedded object such as a chart. - # Corresponds to the JSON property `position` - # @return [Google::Apis::SheetsV4::EmbeddedObjectPosition] - attr_accessor :position - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @position = args[:position] if args.key?(:position) - end - end - - # The response when clearing a range of values in a spreadsheet. - class ClearValuesResponse - include Google::Apis::Core::Hashable - - # The spreadsheet the updates were applied to. - # Corresponds to the JSON property `spreadsheetId` - # @return [String] - attr_accessor :spreadsheet_id - - # The range (in A1 notation) that was cleared. - # (If the request was for an unbounded range or a ranger larger - # than the bounds of the sheet, this will be the actual range - # that was cleared, bounded to the sheet's limits.) - # Corresponds to the JSON property `clearedRange` - # @return [String] - attr_accessor :cleared_range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) - @cleared_range = args[:cleared_range] if args.key?(:cleared_range) - end - end - - # Updates a conditional format rule at the given index, - # or moves a conditional format rule to another index. - class UpdateConditionalFormatRuleRequest - include Google::Apis::Core::Hashable - - # The sheet of the rule to move. Required if new_index is set, - # unused otherwise. - # Corresponds to the JSON property `sheetId` - # @return [Fixnum] - attr_accessor :sheet_id - - # A rule describing a conditional format. - # Corresponds to the JSON property `rule` - # @return [Google::Apis::SheetsV4::ConditionalFormatRule] - attr_accessor :rule - - # The zero-based index of the rule that should be replaced or moved. - # Corresponds to the JSON property `index` - # @return [Fixnum] - attr_accessor :index - - # The zero-based new index the rule should end up at. - # Corresponds to the JSON property `newIndex` - # @return [Fixnum] - attr_accessor :new_index - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @sheet_id = args[:sheet_id] if args.key?(:sheet_id) - @rule = args[:rule] if args.key?(:rule) - @index = args[:index] if args.key?(:index) - @new_index = args[:new_index] if args.key?(:new_index) - end - end - - # The format of a run of text in a cell. - # Absent values indicate that the field isn't specified. - class TextFormat - include Google::Apis::Core::Hashable - - # True if the text is bold. - # Corresponds to the JSON property `bold` - # @return [Boolean] - attr_accessor :bold - alias_method :bold?, :bold - - # True if the text is italicized. - # Corresponds to the JSON property `italic` - # @return [Boolean] - attr_accessor :italic - alias_method :italic?, :italic - - # Represents a color in the RGBA color space. This representation is designed - # for simplicity of conversion to/from color representations in various - # languages over compactness; for example, the fields of this representation - # can be trivially provided to the constructor of "java.awt.Color" in Java; it - # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" - # method in iOS; and, with just a little work, it can be easily formatted into - # a CSS "rgba()" string in JavaScript, as well. Here are some examples: - # Example (Java): - # import com.google.type.Color; - # // ... - # public static java.awt.Color fromProto(Color protocolor) ` - # float alpha = protocolor.hasAlpha() - # ? protocolor.getAlpha().getValue() - # : 1.0; - # return new java.awt.Color( - # protocolor.getRed(), - # protocolor.getGreen(), - # protocolor.getBlue(), - # alpha); - # ` - # public static Color toProto(java.awt.Color color) ` - # float red = (float) color.getRed(); - # float green = (float) color.getGreen(); - # float blue = (float) color.getBlue(); - # float denominator = 255.0; - # Color.Builder resultBuilder = - # Color - # .newBuilder() - # .setRed(red / denominator) - # .setGreen(green / denominator) - # .setBlue(blue / denominator); - # int alpha = color.getAlpha(); - # if (alpha != 255) ` - # result.setAlpha( - # FloatValue - # .newBuilder() - # .setValue(((float) alpha) / denominator) - # .build()); - # ` - # return resultBuilder.build(); - # ` - # // ... - # Example (iOS / Obj-C): - # // ... - # static UIColor* fromProto(Color* protocolor) ` - # float red = [protocolor red]; - # float green = [protocolor green]; - # float blue = [protocolor blue]; - # FloatValue* alpha_wrapper = [protocolor alpha]; - # float alpha = 1.0; - # if (alpha_wrapper != nil) ` - # alpha = [alpha_wrapper value]; - # ` - # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; - # ` - # static Color* toProto(UIColor* color) ` - # CGFloat red, green, blue, alpha; - # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) ` - # return nil; - # ` - # Color* result = [Color alloc] init]; - # [result setRed:red]; - # [result setGreen:green]; - # [result setBlue:blue]; - # if (alpha <= 0.9999) ` - # [result setAlpha:floatWrapperWithValue(alpha)]; - # ` - # [result autorelease]; - # return result; - # ` - # // ... - # Example (JavaScript): - # // ... - # var protoToCssColor = function(rgb_color) ` - # var redFrac = rgb_color.red || 0.0; - # var greenFrac = rgb_color.green || 0.0; - # var blueFrac = rgb_color.blue || 0.0; - # var red = Math.floor(redFrac * 255); - # var green = Math.floor(greenFrac * 255); - # var blue = Math.floor(blueFrac * 255); - # if (!('alpha' in rgb_color)) ` - # return rgbToCssColor_(red, green, blue); - # ` - # var alphaFrac = rgb_color.alpha.value || 0.0; - # var rgbParams = [red, green, blue].join(','); - # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); - # `; - # var rgbToCssColor_ = function(red, green, blue) ` - # var rgbNumber = new Number((red << 16) | (green << 8) | blue); - # var hexString = rgbNumber.toString(16); - # var missingZeros = 6 - hexString.length; - # var resultBuilder = ['#']; - # for (var i = 0; i < missingZeros; i++) ` - # resultBuilder.push('0'); - # ` - # resultBuilder.push(hexString); - # return resultBuilder.join(''); - # `; - # // ... - # Corresponds to the JSON property `foregroundColor` - # @return [Google::Apis::SheetsV4::Color] - attr_accessor :foreground_color - - # The font family. - # Corresponds to the JSON property `fontFamily` - # @return [String] - attr_accessor :font_family - - # True if the text has a strikethrough. - # Corresponds to the JSON property `strikethrough` - # @return [Boolean] - attr_accessor :strikethrough - alias_method :strikethrough?, :strikethrough - - # The size of the font. - # Corresponds to the JSON property `fontSize` - # @return [Fixnum] - attr_accessor :font_size - - # True if the text is underlined. - # Corresponds to the JSON property `underline` - # @return [Boolean] - attr_accessor :underline - alias_method :underline?, :underline - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @bold = args[:bold] if args.key?(:bold) - @italic = args[:italic] if args.key?(:italic) - @foreground_color = args[:foreground_color] if args.key?(:foreground_color) - @font_family = args[:font_family] if args.key?(:font_family) - @strikethrough = args[:strikethrough] if args.key?(:strikethrough) - @font_size = args[:font_size] if args.key?(:font_size) - @underline = args[:underline] if args.key?(:underline) - end - end - - # Updates a chart's specifications. - # (This does not move or resize a chart. To move or resize a chart, use - # UpdateEmbeddedObjectPositionRequest.) - class UpdateChartSpecRequest - include Google::Apis::Core::Hashable - - # The ID of the chart to update. - # Corresponds to the JSON property `chartId` - # @return [Fixnum] - attr_accessor :chart_id - - # The specifications of a chart. - # Corresponds to the JSON property `spec` - # @return [Google::Apis::SheetsV4::ChartSpec] - attr_accessor :spec - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @chart_id = args[:chart_id] if args.key?(:chart_id) - @spec = args[:spec] if args.key?(:spec) - end - end - - # A coordinate in a sheet. - # All indexes are zero-based. - class GridCoordinate - include Google::Apis::Core::Hashable - - # The sheet this coordinate is on. - # Corresponds to the JSON property `sheetId` - # @return [Fixnum] - attr_accessor :sheet_id - - # The row index of the coordinate. - # Corresponds to the JSON property `rowIndex` - # @return [Fixnum] - attr_accessor :row_index - - # The column index of the coordinate. - # Corresponds to the JSON property `columnIndex` - # @return [Fixnum] - attr_accessor :column_index - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @sheet_id = args[:sheet_id] if args.key?(:sheet_id) - @row_index = args[:row_index] if args.key?(:row_index) - @column_index = args[:column_index] if args.key?(:column_index) - end - end - - # Deletes a particular filter view. - class DeleteFilterViewRequest - include Google::Apis::Core::Hashable - - # The ID of the filter to delete. - # Corresponds to the JSON property `filterId` - # @return [Fixnum] - attr_accessor :filter_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @filter_id = args[:filter_id] if args.key?(:filter_id) - end - end - - # The response when updating a range of values in a spreadsheet. - class BatchUpdateValuesResponse - include Google::Apis::Core::Hashable - - # The total number of sheets where at least one cell in the sheet was - # updated. - # Corresponds to the JSON property `totalUpdatedSheets` - # @return [Fixnum] - attr_accessor :total_updated_sheets - - # The total number of columns where at least one cell in the column was - # updated. - # Corresponds to the JSON property `totalUpdatedColumns` - # @return [Fixnum] - attr_accessor :total_updated_columns - - # One UpdateValuesResponse per requested range, in the same order as - # the requests appeared. - # Corresponds to the JSON property `responses` - # @return [Array] - attr_accessor :responses - - # The total number of cells updated. - # Corresponds to the JSON property `totalUpdatedCells` - # @return [Fixnum] - attr_accessor :total_updated_cells - - # The spreadsheet the updates were applied to. - # Corresponds to the JSON property `spreadsheetId` - # @return [String] - attr_accessor :spreadsheet_id - - # The total number of rows where at least one cell in the row was updated. - # Corresponds to the JSON property `totalUpdatedRows` - # @return [Fixnum] - attr_accessor :total_updated_rows - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @total_updated_sheets = args[:total_updated_sheets] if args.key?(:total_updated_sheets) - @total_updated_columns = args[:total_updated_columns] if args.key?(:total_updated_columns) - @responses = args[:responses] if args.key?(:responses) - @total_updated_cells = args[:total_updated_cells] if args.key?(:total_updated_cells) - @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) - @total_updated_rows = args[:total_updated_rows] if args.key?(:total_updated_rows) - end - end - - # Updates properties of the named range with the specified - # namedRangeId. - class UpdateNamedRangeRequest - include Google::Apis::Core::Hashable - - # The fields that should be updated. At least one field must be specified. - # The root `namedRange` is implied and should not be specified. - # A single `"*"` can be used as short-hand for listing every field. - # Corresponds to the JSON property `fields` - # @return [String] - attr_accessor :fields - - # A named range. - # Corresponds to the JSON property `namedRange` - # @return [Google::Apis::SheetsV4::NamedRange] - attr_accessor :named_range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @fields = args[:fields] if args.key?(:fields) - @named_range = args[:named_range] if args.key?(:named_range) - end - end - # The response when updating a range of values in a spreadsheet. class UpdateValuesResponse include Google::Apis::Core::Hashable - # The number of columns where at least one cell in the column was updated. - # Corresponds to the JSON property `updatedColumns` - # @return [Fixnum] - attr_accessor :updated_columns - - # The number of cells updated. - # Corresponds to the JSON property `updatedCells` - # @return [Fixnum] - attr_accessor :updated_cells - # Data within a range of the spreadsheet. # Corresponds to the JSON property `updatedData` # @return [Google::Apis::SheetsV4::ValueRange] attr_accessor :updated_data - # The range (in A1 notation) that updates were applied to. - # Corresponds to the JSON property `updatedRange` - # @return [String] - attr_accessor :updated_range + # The number of rows where at least one cell in the row was updated. + # Corresponds to the JSON property `updatedRows` + # @return [Fixnum] + attr_accessor :updated_rows + + # The number of columns where at least one cell in the column was updated. + # Corresponds to the JSON property `updatedColumns` + # @return [Fixnum] + attr_accessor :updated_columns # The spreadsheet the updates were applied to. # Corresponds to the JSON property `spreadsheetId` # @return [String] attr_accessor :spreadsheet_id - # The number of rows where at least one cell in the row was updated. - # Corresponds to the JSON property `updatedRows` + # The range (in A1 notation) that updates were applied to. + # Corresponds to the JSON property `updatedRange` + # @return [String] + attr_accessor :updated_range + + # The number of cells updated. + # Corresponds to the JSON property `updatedCells` # @return [Fixnum] - attr_accessor :updated_rows + attr_accessor :updated_cells def initialize(**args) update!(**args) @@ -640,228 +62,48 @@ module Google # Update properties of this object def update!(**args) - @updated_columns = args[:updated_columns] if args.key?(:updated_columns) - @updated_cells = args[:updated_cells] if args.key?(:updated_cells) @updated_data = args[:updated_data] if args.key?(:updated_data) - @updated_range = args[:updated_range] if args.key?(:updated_range) - @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) @updated_rows = args[:updated_rows] if args.key?(:updated_rows) + @updated_columns = args[:updated_columns] if args.key?(:updated_columns) + @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) + @updated_range = args[:updated_range] if args.key?(:updated_range) + @updated_cells = args[:updated_cells] if args.key?(:updated_cells) end end - # Properties of a spreadsheet. - class SpreadsheetProperties + # The definition of how a value in a pivot table should be calculated. + class PivotValue include Google::Apis::Core::Hashable - # The time zone of the spreadsheet, in CLDR format such as - # `America/New_York`. If the time zone isn't recognized, this may - # be a custom time zone such as `GMT-07:00`. - # Corresponds to the JSON property `timeZone` + # The column offset of the source range that this value reads from. + # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0` + # means this value refers to column `C`, whereas the offset `1` would + # refer to column `D`. + # Corresponds to the JSON property `sourceColumnOffset` + # @return [Fixnum] + attr_accessor :source_column_offset + + # A name to use for the value. This is only used if formula was set. + # Otherwise, the column name is used. + # Corresponds to the JSON property `name` # @return [String] - attr_accessor :time_zone + attr_accessor :name - # The amount of time to wait before volatile functions are recalculated. - # Corresponds to the JSON property `autoRecalc` + # A custom formula to calculate the value. The formula must start + # with an `=` character. + # Corresponds to the JSON property `formula` # @return [String] - attr_accessor :auto_recalc + attr_accessor :formula - # The locale of the spreadsheet in one of the following formats: - # * an ISO 639-1 language code such as `en` - # * an ISO 639-2 language code such as `fil`, if no 639-1 code exists - # * a combination of the ISO language code and country code, such as `en_US` - # Note: when updating this field, not all locales/languages are supported. - # Corresponds to the JSON property `locale` - # @return [String] - attr_accessor :locale - - # The title of the spreadsheet. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # The format of a cell. - # Corresponds to the JSON property `defaultFormat` - # @return [Google::Apis::SheetsV4::CellFormat] - attr_accessor :default_format - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @time_zone = args[:time_zone] if args.key?(:time_zone) - @auto_recalc = args[:auto_recalc] if args.key?(:auto_recalc) - @locale = args[:locale] if args.key?(:locale) - @title = args[:title] if args.key?(:title) - @default_format = args[:default_format] if args.key?(:default_format) - end - end - - # Data about a specific cell. - class CellData - include Google::Apis::Core::Hashable - - # A hyperlink this cell points to, if any. - # This field is read-only. (To set it, use a `=HYPERLINK` formula.) - # Corresponds to the JSON property `hyperlink` - # @return [String] - attr_accessor :hyperlink - - # The format of a cell. - # Corresponds to the JSON property `effectiveFormat` - # @return [Google::Apis::SheetsV4::CellFormat] - attr_accessor :effective_format - - # Any note on the cell. - # Corresponds to the JSON property `note` - # @return [String] - attr_accessor :note - - # The formatted value of the cell. - # This is the value as it's shown to the user. - # This field is read-only. - # Corresponds to the JSON property `formattedValue` - # @return [String] - attr_accessor :formatted_value - - # The kinds of value that a cell in a spreadsheet can have. - # Corresponds to the JSON property `userEnteredValue` - # @return [Google::Apis::SheetsV4::ExtendedValue] - attr_accessor :user_entered_value - - # A data validation rule. - # Corresponds to the JSON property `dataValidation` - # @return [Google::Apis::SheetsV4::DataValidationRule] - attr_accessor :data_validation - - # The format of a cell. - # Corresponds to the JSON property `userEnteredFormat` - # @return [Google::Apis::SheetsV4::CellFormat] - attr_accessor :user_entered_format - - # A pivot table. - # Corresponds to the JSON property `pivotTable` - # @return [Google::Apis::SheetsV4::PivotTable] - attr_accessor :pivot_table - - # Runs of rich text applied to subsections of the cell. Runs are only valid - # on user entered strings, not formulas, bools, or numbers. - # Runs start at specific indexes in the text and continue until the next - # run. Properties of a run will continue unless explicitly changed - # in a subsequent run (and properties of the first run will continue - # the properties of the cell unless explicitly changed). - # When writing, the new runs will overwrite any prior runs. When writing a - # new user_entered_value, previous runs will be erased. - # Corresponds to the JSON property `textFormatRuns` - # @return [Array] - attr_accessor :text_format_runs - - # The kinds of value that a cell in a spreadsheet can have. - # Corresponds to the JSON property `effectiveValue` - # @return [Google::Apis::SheetsV4::ExtendedValue] - attr_accessor :effective_value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @hyperlink = args[:hyperlink] if args.key?(:hyperlink) - @effective_format = args[:effective_format] if args.key?(:effective_format) - @note = args[:note] if args.key?(:note) - @formatted_value = args[:formatted_value] if args.key?(:formatted_value) - @user_entered_value = args[:user_entered_value] if args.key?(:user_entered_value) - @data_validation = args[:data_validation] if args.key?(:data_validation) - @user_entered_format = args[:user_entered_format] if args.key?(:user_entered_format) - @pivot_table = args[:pivot_table] if args.key?(:pivot_table) - @text_format_runs = args[:text_format_runs] if args.key?(:text_format_runs) - @effective_value = args[:effective_value] if args.key?(:effective_value) - end - end - - # Unmerges cells in the given range. - class UnmergeCellsRequest - include Google::Apis::Core::Hashable - - # A range on a sheet. - # All indexes are zero-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if `"Sheet1"` is sheet ID 0, then: - # `Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1` - # `Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1 == sheet_id:0` - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as `#REF!`. - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV4::GridRange] - attr_accessor :range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @range = args[:range] if args.key?(:range) - end - end - - # Splits a column of text into multiple columns, - # based on a delimiter in each cell. - class TextToColumnsRequest - include Google::Apis::Core::Hashable - - # A range on a sheet. - # All indexes are zero-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if `"Sheet1"` is sheet ID 0, then: - # `Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1` - # `Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1 == sheet_id:0` - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as `#REF!`. - # Corresponds to the JSON property `source` - # @return [Google::Apis::SheetsV4::GridRange] - attr_accessor :source - - # The delimiter to use. Used only if delimiterType is + # A function to summarize the value. + # If formula is set, the only supported values are + # SUM and # CUSTOM. - # Corresponds to the JSON property `delimiter` + # If sourceColumnOffset is set, then `CUSTOM` + # is not supported. + # Corresponds to the JSON property `summarizeFunction` # @return [String] - attr_accessor :delimiter - - # The delimiter type to use. - # Corresponds to the JSON property `delimiterType` - # @return [String] - attr_accessor :delimiter_type + attr_accessor :summarize_function def initialize(**args) update!(**args) @@ -869,46 +111,24 @@ module Google # Update properties of this object def update!(**args) - @source = args[:source] if args.key?(:source) - @delimiter = args[:delimiter] if args.key?(:delimiter) - @delimiter_type = args[:delimiter_type] if args.key?(:delimiter_type) + @source_column_offset = args[:source_column_offset] if args.key?(:source_column_offset) + @name = args[:name] if args.key?(:name) + @formula = args[:formula] if args.key?(:formula) + @summarize_function = args[:summarize_function] if args.key?(:summarize_function) end end - # The result of adding a new protected range. - class AddProtectedRangeResponse + # An error in a cell. + class ErrorValue include Google::Apis::Core::Hashable - # A protected range. - # Corresponds to the JSON property `protectedRange` - # @return [Google::Apis::SheetsV4::ProtectedRange] - attr_accessor :protected_range + # A message with more information about the error + # (in the spreadsheet's locale). + # Corresponds to the JSON property `message` + # @return [String] + attr_accessor :message - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @protected_range = args[:protected_range] if args.key?(:protected_range) - end - end - - # A condition that can evaluate to true or false. - # BooleanConditions are used by conditional formatting, - # data validation, and the criteria in filters. - class BooleanCondition - include Google::Apis::Core::Hashable - - # The values of the condition. The number of supported values depends - # on the condition type. Some support zero values, - # others one or two values, - # and ConditionType.ONE_OF_LIST supports an arbitrary number of values. - # Corresponds to the JSON property `values` - # @return [Array] - attr_accessor :values - - # The type of condition. + # The type of error. # Corresponds to the JSON property `type` # @return [String] attr_accessor :type @@ -919,77 +139,19 @@ module Google # Update properties of this object def update!(**args) - @values = args[:values] if args.key?(:values) + @message = args[:message] if args.key?(:message) @type = args[:type] if args.key?(:type) end end - # Deletes the protected range with the given ID. - class DeleteProtectedRangeRequest + # The request to copy a sheet across spreadsheets. + class CopySheetToAnotherSpreadsheetRequest include Google::Apis::Core::Hashable - # The ID of the protected range to delete. - # Corresponds to the JSON property `protectedRangeId` - # @return [Fixnum] - attr_accessor :protected_range_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @protected_range_id = args[:protected_range_id] if args.key?(:protected_range_id) - end - end - - # The domain of a chart. - # For example, if charting stock prices over time, this would be the date. - class BasicChartDomain - include Google::Apis::Core::Hashable - - # The data included in a domain or series. - # Corresponds to the JSON property `domain` - # @return [Google::Apis::SheetsV4::ChartData] - attr_accessor :domain - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @domain = args[:domain] if args.key?(:domain) - end - end - - # A range along a single dimension on a sheet. - # All indexes are zero-based. - # Indexes are half open: the start index is inclusive - # and the end index is exclusive. - # Missing indexes indicate the range is unbounded on that side. - class DimensionRange - include Google::Apis::Core::Hashable - - # The sheet this span is on. - # Corresponds to the JSON property `sheetId` - # @return [Fixnum] - attr_accessor :sheet_id - - # The end (exclusive) of the span, or not set if unbounded. - # Corresponds to the JSON property `endIndex` - # @return [Fixnum] - attr_accessor :end_index - - # The start (inclusive) of the span, or not set if unbounded. - # Corresponds to the JSON property `startIndex` - # @return [Fixnum] - attr_accessor :start_index - - # The dimension of the span. - # Corresponds to the JSON property `dimension` + # The ID of the spreadsheet to copy the sheet to. + # Corresponds to the JSON property `destinationSpreadsheetId` # @return [String] - attr_accessor :dimension + attr_accessor :destination_spreadsheet_id def initialize(**args) update!(**args) @@ -997,1451 +159,7 @@ module Google # Update properties of this object def update!(**args) - @sheet_id = args[:sheet_id] if args.key?(:sheet_id) - @end_index = args[:end_index] if args.key?(:end_index) - @start_index = args[:start_index] if args.key?(:start_index) - @dimension = args[:dimension] if args.key?(:dimension) - end - end - - # A single response from an update. - class Response - include Google::Apis::Core::Hashable - - # The result of updating an embedded object's position. - # Corresponds to the JSON property `updateEmbeddedObjectPosition` - # @return [Google::Apis::SheetsV4::UpdateEmbeddedObjectPositionResponse] - attr_accessor :update_embedded_object_position - - # The result of adding a filter view. - # Corresponds to the JSON property `addFilterView` - # @return [Google::Apis::SheetsV4::AddFilterViewResponse] - attr_accessor :add_filter_view - - # The result of adding a sheet. - # Corresponds to the JSON property `addSheet` - # @return [Google::Apis::SheetsV4::AddSheetResponse] - attr_accessor :add_sheet - - # The result of the find/replace. - # Corresponds to the JSON property `findReplace` - # @return [Google::Apis::SheetsV4::FindReplaceResponse] - attr_accessor :find_replace - - # The result of adding a new protected range. - # Corresponds to the JSON property `addProtectedRange` - # @return [Google::Apis::SheetsV4::AddProtectedRangeResponse] - attr_accessor :add_protected_range - - # The result of updating a conditional format rule. - # Corresponds to the JSON property `updateConditionalFormatRule` - # @return [Google::Apis::SheetsV4::UpdateConditionalFormatRuleResponse] - attr_accessor :update_conditional_format_rule - - # The result of adding a chart to a spreadsheet. - # Corresponds to the JSON property `addChart` - # @return [Google::Apis::SheetsV4::AddChartResponse] - attr_accessor :add_chart - - # The result of deleting a conditional format rule. - # Corresponds to the JSON property `deleteConditionalFormatRule` - # @return [Google::Apis::SheetsV4::DeleteConditionalFormatRuleResponse] - attr_accessor :delete_conditional_format_rule - - # The result of adding a banded range. - # Corresponds to the JSON property `addBanding` - # @return [Google::Apis::SheetsV4::AddBandingResponse] - attr_accessor :add_banding - - # The result of duplicating a sheet. - # Corresponds to the JSON property `duplicateSheet` - # @return [Google::Apis::SheetsV4::DuplicateSheetResponse] - attr_accessor :duplicate_sheet - - # The result of a filter view being duplicated. - # Corresponds to the JSON property `duplicateFilterView` - # @return [Google::Apis::SheetsV4::DuplicateFilterViewResponse] - attr_accessor :duplicate_filter_view - - # The result of adding a named range. - # Corresponds to the JSON property `addNamedRange` - # @return [Google::Apis::SheetsV4::AddNamedRangeResponse] - attr_accessor :add_named_range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @update_embedded_object_position = args[:update_embedded_object_position] if args.key?(:update_embedded_object_position) - @add_filter_view = args[:add_filter_view] if args.key?(:add_filter_view) - @add_sheet = args[:add_sheet] if args.key?(:add_sheet) - @find_replace = args[:find_replace] if args.key?(:find_replace) - @add_protected_range = args[:add_protected_range] if args.key?(:add_protected_range) - @update_conditional_format_rule = args[:update_conditional_format_rule] if args.key?(:update_conditional_format_rule) - @add_chart = args[:add_chart] if args.key?(:add_chart) - @delete_conditional_format_rule = args[:delete_conditional_format_rule] if args.key?(:delete_conditional_format_rule) - @add_banding = args[:add_banding] if args.key?(:add_banding) - @duplicate_sheet = args[:duplicate_sheet] if args.key?(:duplicate_sheet) - @duplicate_filter_view = args[:duplicate_filter_view] if args.key?(:duplicate_filter_view) - @add_named_range = args[:add_named_range] if args.key?(:add_named_range) - end - end - - # Adds a new conditional format rule at the given index. - # All subsequent rules' indexes are incremented. - class AddConditionalFormatRuleRequest - include Google::Apis::Core::Hashable - - # A rule describing a conditional format. - # Corresponds to the JSON property `rule` - # @return [Google::Apis::SheetsV4::ConditionalFormatRule] - attr_accessor :rule - - # The zero-based index where the rule should be inserted. - # Corresponds to the JSON property `index` - # @return [Fixnum] - attr_accessor :index - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @rule = args[:rule] if args.key?(:rule) - @index = args[:index] if args.key?(:index) - end - end - - # A filter view. - class FilterView - include Google::Apis::Core::Hashable - - # The name of the filter view. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # The named range this filter view is backed by, if any. - # When writing, only one of range or named_range_id - # may be set. - # Corresponds to the JSON property `namedRangeId` - # @return [String] - attr_accessor :named_range_id - - # The sort order per column. Later specifications are used when values - # are equal in the earlier specifications. - # Corresponds to the JSON property `sortSpecs` - # @return [Array] - attr_accessor :sort_specs - - # A range on a sheet. - # All indexes are zero-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if `"Sheet1"` is sheet ID 0, then: - # `Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1` - # `Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1 == sheet_id:0` - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as `#REF!`. - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV4::GridRange] - attr_accessor :range - - # The criteria for showing/hiding values per column. - # The map's key is the column index, and the value is the criteria for - # that column. - # Corresponds to the JSON property `criteria` - # @return [Hash] - attr_accessor :criteria - - # The ID of the filter view. - # Corresponds to the JSON property `filterViewId` - # @return [Fixnum] - attr_accessor :filter_view_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @title = args[:title] if args.key?(:title) - @named_range_id = args[:named_range_id] if args.key?(:named_range_id) - @sort_specs = args[:sort_specs] if args.key?(:sort_specs) - @range = args[:range] if args.key?(:range) - @criteria = args[:criteria] if args.key?(:criteria) - @filter_view_id = args[:filter_view_id] if args.key?(:filter_view_id) - end - end - - # Sorts data in rows based on a sort order per column. - class SortRangeRequest - include Google::Apis::Core::Hashable - - # A range on a sheet. - # All indexes are zero-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if `"Sheet1"` is sheet ID 0, then: - # `Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1` - # `Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1 == sheet_id:0` - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as `#REF!`. - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV4::GridRange] - attr_accessor :range - - # The sort order per column. Later specifications are used when values - # are equal in the earlier specifications. - # Corresponds to the JSON property `sortSpecs` - # @return [Array] - attr_accessor :sort_specs - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @range = args[:range] if args.key?(:range) - @sort_specs = args[:sort_specs] if args.key?(:sort_specs) - end - end - - # The result of adding a banded range. - class AddBandingResponse - include Google::Apis::Core::Hashable - - # A banded (alternating colors) range in a sheet. - # Corresponds to the JSON property `bandedRange` - # @return [Google::Apis::SheetsV4::BandedRange] - attr_accessor :banded_range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @banded_range = args[:banded_range] if args.key?(:banded_range) - end - end - - # A run of a text format. The format of this run continues until the start - # index of the next run. - # When updating, all fields must be set. - class TextFormatRun - include Google::Apis::Core::Hashable - - # The character index where this run starts. - # Corresponds to the JSON property `startIndex` - # @return [Fixnum] - attr_accessor :start_index - - # The format of a run of text in a cell. - # Absent values indicate that the field isn't specified. - # Corresponds to the JSON property `format` - # @return [Google::Apis::SheetsV4::TextFormat] - attr_accessor :format - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @start_index = args[:start_index] if args.key?(:start_index) - @format = args[:format] if args.key?(:format) - end - end - - # Updates properties of the filter view. - class UpdateFilterViewRequest - include Google::Apis::Core::Hashable - - # A filter view. - # Corresponds to the JSON property `filter` - # @return [Google::Apis::SheetsV4::FilterView] - attr_accessor :filter - - # The fields that should be updated. At least one field must be specified. - # The root `filter` is implied and should not be specified. - # A single `"*"` can be used as short-hand for listing every field. - # Corresponds to the JSON property `fields` - # @return [String] - attr_accessor :fields - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @filter = args[:filter] if args.key?(:filter) - @fields = args[:fields] if args.key?(:fields) - end - end - - # The result of updating a conditional format rule. - class UpdateConditionalFormatRuleResponse - include Google::Apis::Core::Hashable - - # The old index of the rule. Not set if a rule was replaced - # (because it is the same as new_index). - # Corresponds to the JSON property `oldIndex` - # @return [Fixnum] - attr_accessor :old_index - - # A rule describing a conditional format. - # Corresponds to the JSON property `newRule` - # @return [Google::Apis::SheetsV4::ConditionalFormatRule] - attr_accessor :new_rule - - # A rule describing a conditional format. - # Corresponds to the JSON property `oldRule` - # @return [Google::Apis::SheetsV4::ConditionalFormatRule] - attr_accessor :old_rule - - # The index of the new rule. - # Corresponds to the JSON property `newIndex` - # @return [Fixnum] - attr_accessor :new_index - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @old_index = args[:old_index] if args.key?(:old_index) - @new_rule = args[:new_rule] if args.key?(:new_rule) - @old_rule = args[:old_rule] if args.key?(:old_rule) - @new_index = args[:new_index] if args.key?(:new_index) - end - end - - # Criteria for showing/hiding rows in a filter or filter view. - class FilterCriteria - include Google::Apis::Core::Hashable - - # A condition that can evaluate to true or false. - # BooleanConditions are used by conditional formatting, - # data validation, and the criteria in filters. - # Corresponds to the JSON property `condition` - # @return [Google::Apis::SheetsV4::BooleanCondition] - attr_accessor :condition - - # Values that should be hidden. - # Corresponds to the JSON property `hiddenValues` - # @return [Array] - attr_accessor :hidden_values - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @condition = args[:condition] if args.key?(:condition) - @hidden_values = args[:hidden_values] if args.key?(:hidden_values) - end - end - - # Deletes the dimensions from the sheet. - class DeleteDimensionRequest - include Google::Apis::Core::Hashable - - # A range along a single dimension on a sheet. - # All indexes are zero-based. - # Indexes are half open: the start index is inclusive - # and the end index is exclusive. - # Missing indexes indicate the range is unbounded on that side. - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV4::DimensionRange] - attr_accessor :range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @range = args[:range] if args.key?(:range) - end - end - - # A pivot table. - class PivotTable - include Google::Apis::Core::Hashable - - # Whether values should be listed horizontally (as columns) - # or vertically (as rows). - # Corresponds to the JSON property `valueLayout` - # @return [String] - attr_accessor :value_layout - - # Each column grouping in the pivot table. - # Corresponds to the JSON property `columns` - # @return [Array] - attr_accessor :columns - - # A range on a sheet. - # All indexes are zero-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if `"Sheet1"` is sheet ID 0, then: - # `Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1` - # `Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1 == sheet_id:0` - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as `#REF!`. - # Corresponds to the JSON property `source` - # @return [Google::Apis::SheetsV4::GridRange] - attr_accessor :source - - # Each row grouping in the pivot table. - # Corresponds to the JSON property `rows` - # @return [Array] - attr_accessor :rows - - # A list of values to include in the pivot table. - # Corresponds to the JSON property `values` - # @return [Array] - attr_accessor :values - - # An optional mapping of filters per source column offset. - # The filters will be applied before aggregating data into the pivot table. - # The map's key is the column offset of the source range that you want to - # filter, and the value is the criteria for that column. - # For example, if the source was `C10:E15`, a key of `0` will have the filter - # for column `C`, whereas the key `1` is for column `D`. - # Corresponds to the JSON property `criteria` - # @return [Hash] - attr_accessor :criteria - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @value_layout = args[:value_layout] if args.key?(:value_layout) - @columns = args[:columns] if args.key?(:columns) - @source = args[:source] if args.key?(:source) - @rows = args[:rows] if args.key?(:rows) - @values = args[:values] if args.key?(:values) - @criteria = args[:criteria] if args.key?(:criteria) - end - end - - # A data validation rule. - class DataValidationRule - include Google::Apis::Core::Hashable - - # A condition that can evaluate to true or false. - # BooleanConditions are used by conditional formatting, - # data validation, and the criteria in filters. - # Corresponds to the JSON property `condition` - # @return [Google::Apis::SheetsV4::BooleanCondition] - attr_accessor :condition - - # A message to show the user when adding data to the cell. - # Corresponds to the JSON property `inputMessage` - # @return [String] - attr_accessor :input_message - - # True if the UI should be customized based on the kind of condition. - # If true, "List" conditions will show a dropdown. - # Corresponds to the JSON property `showCustomUi` - # @return [Boolean] - attr_accessor :show_custom_ui - alias_method :show_custom_ui?, :show_custom_ui - - # True if invalid data should be rejected. - # Corresponds to the JSON property `strict` - # @return [Boolean] - attr_accessor :strict - alias_method :strict?, :strict - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @condition = args[:condition] if args.key?(:condition) - @input_message = args[:input_message] if args.key?(:input_message) - @show_custom_ui = args[:show_custom_ui] if args.key?(:show_custom_ui) - @strict = args[:strict] if args.key?(:strict) - end - end - - # Updates properties of a spreadsheet. - class UpdateSpreadsheetPropertiesRequest - include Google::Apis::Core::Hashable - - # The fields that should be updated. At least one field must be specified. - # The root 'properties' is implied and should not be specified. - # A single `"*"` can be used as short-hand for listing every field. - # Corresponds to the JSON property `fields` - # @return [String] - attr_accessor :fields - - # Properties of a spreadsheet. - # Corresponds to the JSON property `properties` - # @return [Google::Apis::SheetsV4::SpreadsheetProperties] - attr_accessor :properties - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @fields = args[:fields] if args.key?(:fields) - @properties = args[:properties] if args.key?(:properties) - end - end - - # Source ranges for a chart. - class ChartSourceRange - include Google::Apis::Core::Hashable - - # The ranges of data for a series or domain. - # Exactly one dimension must have a length of 1, - # and all sources in the list must have the same dimension - # with length 1. - # The domain (if it exists) & all series must have the same number - # of source ranges. If using more than one source range, then the source - # range at a given offset must be contiguous across the domain and series. - # For example, these are valid configurations: - # domain sources: A1:A5 - # series1 sources: B1:B5 - # series2 sources: D6:D10 - # domain sources: A1:A5, C10:C12 - # series1 sources: B1:B5, D10:D12 - # series2 sources: C1:C5, E10:E12 - # Corresponds to the JSON property `sources` - # @return [Array] - attr_accessor :sources - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @sources = args[:sources] if args.key?(:sources) - end - end - - # The request for updating more than one range of values in a spreadsheet. - class BatchUpdateValuesRequest - include Google::Apis::Core::Hashable - - # How the input data should be interpreted. - # Corresponds to the JSON property `valueInputOption` - # @return [String] - attr_accessor :value_input_option - - # The new values to apply to the spreadsheet. - # Corresponds to the JSON property `data` - # @return [Array] - attr_accessor :data - - # Determines how values in the response should be rendered. - # The default render option is ValueRenderOption.FORMATTED_VALUE. - # Corresponds to the JSON property `responseValueRenderOption` - # @return [String] - attr_accessor :response_value_render_option - - # Determines how dates, times, and durations in the response should be - # rendered. This is ignored if response_value_render_option is - # FORMATTED_VALUE. - # The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER]. - # Corresponds to the JSON property `responseDateTimeRenderOption` - # @return [String] - attr_accessor :response_date_time_render_option - - # Determines if the update response should include the values - # of the cells that were updated. By default, responses - # do not include the updated values. The `updatedData` field within - # each of the BatchUpdateValuesResponse.responses will contain - # the updated values. If the range to write was larger than than the range - # actually written, the response will include all values in the requested - # range (excluding trailing empty rows and columns). - # Corresponds to the JSON property `includeValuesInResponse` - # @return [Boolean] - attr_accessor :include_values_in_response - alias_method :include_values_in_response?, :include_values_in_response - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @value_input_option = args[:value_input_option] if args.key?(:value_input_option) - @data = args[:data] if args.key?(:data) - @response_value_render_option = args[:response_value_render_option] if args.key?(:response_value_render_option) - @response_date_time_render_option = args[:response_date_time_render_option] if args.key?(:response_date_time_render_option) - @include_values_in_response = args[:include_values_in_response] if args.key?(:include_values_in_response) - end - end - - # Clears the basic filter, if any exists on the sheet. - class ClearBasicFilterRequest - include Google::Apis::Core::Hashable - - # The sheet ID on which the basic filter should be cleared. - # Corresponds to the JSON property `sheetId` - # @return [Fixnum] - attr_accessor :sheet_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @sheet_id = args[:sheet_id] if args.key?(:sheet_id) - end - end - - # The response when updating a range of values in a spreadsheet. - class BatchClearValuesResponse - include Google::Apis::Core::Hashable - - # The spreadsheet the updates were applied to. - # Corresponds to the JSON property `spreadsheetId` - # @return [String] - attr_accessor :spreadsheet_id - - # The ranges that were cleared, in A1 notation. - # (If the requests were for an unbounded range or a ranger larger - # than the bounds of the sheet, this will be the actual ranges - # that were cleared, bounded to the sheet's limits.) - # Corresponds to the JSON property `clearedRanges` - # @return [Array] - attr_accessor :cleared_ranges - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) - @cleared_ranges = args[:cleared_ranges] if args.key?(:cleared_ranges) - end - end - - # A rule describing a conditional format. - class ConditionalFormatRule - include Google::Apis::Core::Hashable - - # A rule that applies a gradient color scale format, based on - # the interpolation points listed. The format of a cell will vary - # based on its contents as compared to the values of the interpolation - # points. - # Corresponds to the JSON property `gradientRule` - # @return [Google::Apis::SheetsV4::GradientRule] - attr_accessor :gradient_rule - - # A rule that may or may not match, depending on the condition. - # Corresponds to the JSON property `booleanRule` - # @return [Google::Apis::SheetsV4::BooleanRule] - attr_accessor :boolean_rule - - # The ranges that will be formatted if the condition is true. - # All the ranges must be on the same grid. - # Corresponds to the JSON property `ranges` - # @return [Array] - attr_accessor :ranges - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @gradient_rule = args[:gradient_rule] if args.key?(:gradient_rule) - @boolean_rule = args[:boolean_rule] if args.key?(:boolean_rule) - @ranges = args[:ranges] if args.key?(:ranges) - end - end - - # Updates the borders of a range. - # If a field is not set in the request, that means the border remains as-is. - # For example, with two subsequent UpdateBordersRequest: - # 1. range: A1:A5 `` top: RED, bottom: WHITE `` - # 2. range: A1:A5 `` left: BLUE `` - # That would result in A1:A5 having a borders of - # `` top: RED, bottom: WHITE, left: BLUE ``. - # If you want to clear a border, explicitly set the style to - # NONE. - class UpdateBordersRequest - include Google::Apis::Core::Hashable - - # A border along a cell. - # Corresponds to the JSON property `right` - # @return [Google::Apis::SheetsV4::Border] - attr_accessor :right - - # A border along a cell. - # Corresponds to the JSON property `innerVertical` - # @return [Google::Apis::SheetsV4::Border] - attr_accessor :inner_vertical - - # A border along a cell. - # Corresponds to the JSON property `top` - # @return [Google::Apis::SheetsV4::Border] - attr_accessor :top - - # A border along a cell. - # Corresponds to the JSON property `innerHorizontal` - # @return [Google::Apis::SheetsV4::Border] - attr_accessor :inner_horizontal - - # A range on a sheet. - # All indexes are zero-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if `"Sheet1"` is sheet ID 0, then: - # `Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1` - # `Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1 == sheet_id:0` - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as `#REF!`. - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV4::GridRange] - attr_accessor :range - - # A border along a cell. - # Corresponds to the JSON property `bottom` - # @return [Google::Apis::SheetsV4::Border] - attr_accessor :bottom - - # A border along a cell. - # Corresponds to the JSON property `left` - # @return [Google::Apis::SheetsV4::Border] - attr_accessor :left - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @right = args[:right] if args.key?(:right) - @inner_vertical = args[:inner_vertical] if args.key?(:inner_vertical) - @top = args[:top] if args.key?(:top) - @inner_horizontal = args[:inner_horizontal] if args.key?(:inner_horizontal) - @range = args[:range] if args.key?(:range) - @bottom = args[:bottom] if args.key?(:bottom) - @left = args[:left] if args.key?(:left) - end - end - - # Criteria for showing/hiding rows in a pivot table. - class PivotFilterCriteria - include Google::Apis::Core::Hashable - - # Values that should be included. Values not listed here are excluded. - # Corresponds to the JSON property `visibleValues` - # @return [Array] - attr_accessor :visible_values - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @visible_values = args[:visible_values] if args.key?(:visible_values) - end - end - - # The borders of the cell. - class Borders - include Google::Apis::Core::Hashable - - # A border along a cell. - # Corresponds to the JSON property `left` - # @return [Google::Apis::SheetsV4::Border] - attr_accessor :left - - # A border along a cell. - # Corresponds to the JSON property `right` - # @return [Google::Apis::SheetsV4::Border] - attr_accessor :right - - # A border along a cell. - # Corresponds to the JSON property `top` - # @return [Google::Apis::SheetsV4::Border] - attr_accessor :top - - # A border along a cell. - # Corresponds to the JSON property `bottom` - # @return [Google::Apis::SheetsV4::Border] - attr_accessor :bottom - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @left = args[:left] if args.key?(:left) - @right = args[:right] if args.key?(:right) - @top = args[:top] if args.key?(:top) - @bottom = args[:bottom] if args.key?(:bottom) - end - end - - # A chart embedded in a sheet. - class EmbeddedChart - include Google::Apis::Core::Hashable - - # The ID of the chart. - # Corresponds to the JSON property `chartId` - # @return [Fixnum] - attr_accessor :chart_id - - # The position of an embedded object such as a chart. - # Corresponds to the JSON property `position` - # @return [Google::Apis::SheetsV4::EmbeddedObjectPosition] - attr_accessor :position - - # The specifications of a chart. - # Corresponds to the JSON property `spec` - # @return [Google::Apis::SheetsV4::ChartSpec] - attr_accessor :spec - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @chart_id = args[:chart_id] if args.key?(:chart_id) - @position = args[:position] if args.key?(:position) - @spec = args[:spec] if args.key?(:spec) - end - end - - # Represents a color in the RGBA color space. This representation is designed - # for simplicity of conversion to/from color representations in various - # languages over compactness; for example, the fields of this representation - # can be trivially provided to the constructor of "java.awt.Color" in Java; it - # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" - # method in iOS; and, with just a little work, it can be easily formatted into - # a CSS "rgba()" string in JavaScript, as well. Here are some examples: - # Example (Java): - # import com.google.type.Color; - # // ... - # public static java.awt.Color fromProto(Color protocolor) ` - # float alpha = protocolor.hasAlpha() - # ? protocolor.getAlpha().getValue() - # : 1.0; - # return new java.awt.Color( - # protocolor.getRed(), - # protocolor.getGreen(), - # protocolor.getBlue(), - # alpha); - # ` - # public static Color toProto(java.awt.Color color) ` - # float red = (float) color.getRed(); - # float green = (float) color.getGreen(); - # float blue = (float) color.getBlue(); - # float denominator = 255.0; - # Color.Builder resultBuilder = - # Color - # .newBuilder() - # .setRed(red / denominator) - # .setGreen(green / denominator) - # .setBlue(blue / denominator); - # int alpha = color.getAlpha(); - # if (alpha != 255) ` - # result.setAlpha( - # FloatValue - # .newBuilder() - # .setValue(((float) alpha) / denominator) - # .build()); - # ` - # return resultBuilder.build(); - # ` - # // ... - # Example (iOS / Obj-C): - # // ... - # static UIColor* fromProto(Color* protocolor) ` - # float red = [protocolor red]; - # float green = [protocolor green]; - # float blue = [protocolor blue]; - # FloatValue* alpha_wrapper = [protocolor alpha]; - # float alpha = 1.0; - # if (alpha_wrapper != nil) ` - # alpha = [alpha_wrapper value]; - # ` - # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; - # ` - # static Color* toProto(UIColor* color) ` - # CGFloat red, green, blue, alpha; - # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) ` - # return nil; - # ` - # Color* result = [Color alloc] init]; - # [result setRed:red]; - # [result setGreen:green]; - # [result setBlue:blue]; - # if (alpha <= 0.9999) ` - # [result setAlpha:floatWrapperWithValue(alpha)]; - # ` - # [result autorelease]; - # return result; - # ` - # // ... - # Example (JavaScript): - # // ... - # var protoToCssColor = function(rgb_color) ` - # var redFrac = rgb_color.red || 0.0; - # var greenFrac = rgb_color.green || 0.0; - # var blueFrac = rgb_color.blue || 0.0; - # var red = Math.floor(redFrac * 255); - # var green = Math.floor(greenFrac * 255); - # var blue = Math.floor(blueFrac * 255); - # if (!('alpha' in rgb_color)) ` - # return rgbToCssColor_(red, green, blue); - # ` - # var alphaFrac = rgb_color.alpha.value || 0.0; - # var rgbParams = [red, green, blue].join(','); - # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); - # `; - # var rgbToCssColor_ = function(red, green, blue) ` - # var rgbNumber = new Number((red << 16) | (green << 8) | blue); - # var hexString = rgbNumber.toString(16); - # var missingZeros = 6 - hexString.length; - # var resultBuilder = ['#']; - # for (var i = 0; i < missingZeros; i++) ` - # resultBuilder.push('0'); - # ` - # resultBuilder.push(hexString); - # return resultBuilder.join(''); - # `; - # // ... - class Color - include Google::Apis::Core::Hashable - - # The amount of green in the color as a value in the interval [0, 1]. - # Corresponds to the JSON property `green` - # @return [Float] - attr_accessor :green - - # The amount of blue in the color as a value in the interval [0, 1]. - # Corresponds to the JSON property `blue` - # @return [Float] - attr_accessor :blue - - # The amount of red in the color as a value in the interval [0, 1]. - # Corresponds to the JSON property `red` - # @return [Float] - attr_accessor :red - - # The fraction of this color that should be applied to the pixel. That is, - # the final pixel color is defined by the equation: - # pixel color = alpha * (this color) + (1.0 - alpha) * (background color) - # This means that a value of 1.0 corresponds to a solid color, whereas - # a value of 0.0 corresponds to a completely transparent color. This - # uses a wrapper message rather than a simple float scalar so that it is - # possible to distinguish between a default value and the value being unset. - # If omitted, this color object is to be rendered as a solid color - # (as if the alpha value had been explicitly given with a value of 1.0). - # Corresponds to the JSON property `alpha` - # @return [Float] - attr_accessor :alpha - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @green = args[:green] if args.key?(:green) - @blue = args[:blue] if args.key?(:blue) - @red = args[:red] if args.key?(:red) - @alpha = args[:alpha] if args.key?(:alpha) - end - end - - # Adds a new sheet. - # When a sheet is added at a given index, - # all subsequent sheets' indexes are incremented. - # To add an object sheet, use AddChartRequest instead and specify - # EmbeddedObjectPosition.sheetId or - # EmbeddedObjectPosition.newSheet. - class AddSheetRequest - include Google::Apis::Core::Hashable - - # Properties of a sheet. - # Corresponds to the JSON property `properties` - # @return [Google::Apis::SheetsV4::SheetProperties] - attr_accessor :properties - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @properties = args[:properties] if args.key?(:properties) - end - end - - # Adds a new protected range. - class AddProtectedRangeRequest - include Google::Apis::Core::Hashable - - # A protected range. - # Corresponds to the JSON property `protectedRange` - # @return [Google::Apis::SheetsV4::ProtectedRange] - attr_accessor :protected_range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @protected_range = args[:protected_range] if args.key?(:protected_range) - end - end - - # Data within a range of the spreadsheet. - class ValueRange - include Google::Apis::Core::Hashable - - # The data that was read or to be written. This is an array of arrays, - # the outer array representing all the data and each inner array - # representing a major dimension. Each item in the inner array - # corresponds with one cell. - # For output, empty trailing rows and columns will not be included. - # For input, supported value types are: bool, string, and double. - # Null values will be skipped. - # To set a cell to an empty value, set the string value to an empty string. - # Corresponds to the JSON property `values` - # @return [Array>] - attr_accessor :values - - # The range the values cover, in A1 notation. - # For output, this range indicates the entire requested range, - # even though the values will exclude trailing rows and columns. - # When appending values, this field represents the range to search for a - # table, after which values will be appended. - # Corresponds to the JSON property `range` - # @return [String] - attr_accessor :range - - # The major dimension of the values. - # For output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, - # then requesting `range=A1:B2,majorDimension=ROWS` will return - # `[[1,2],[3,4]]`, - # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return - # `[[1,3],[2,4]]`. - # For input, with `range=A1:B2,majorDimension=ROWS` then `[[1,2],[3,4]]` - # will set `A1=1,B1=2,A2=3,B2=4`. With `range=A1:B2,majorDimension=COLUMNS` - # then `[[1,2],[3,4]]` will set `A1=1,B1=3,A2=2,B2=4`. - # When writing, if this field is not set, it defaults to ROWS. - # Corresponds to the JSON property `majorDimension` - # @return [String] - attr_accessor :major_dimension - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @values = args[:values] if args.key?(:values) - @range = args[:range] if args.key?(:range) - @major_dimension = args[:major_dimension] if args.key?(:major_dimension) - end - end - - # The result of the find/replace. - class FindReplaceResponse - include Google::Apis::Core::Hashable - - # The number of non-formula cells changed. - # Corresponds to the JSON property `valuesChanged` - # @return [Fixnum] - attr_accessor :values_changed - - # The number of rows changed. - # Corresponds to the JSON property `rowsChanged` - # @return [Fixnum] - attr_accessor :rows_changed - - # The number of occurrences (possibly multiple within a cell) changed. - # For example, if replacing `"e"` with `"o"` in `"Google Sheets"`, this would - # be `"3"` because `"Google Sheets"` -> `"Googlo Shoots"`. - # Corresponds to the JSON property `occurrencesChanged` - # @return [Fixnum] - attr_accessor :occurrences_changed - - # The number of formula cells changed. - # Corresponds to the JSON property `formulasChanged` - # @return [Fixnum] - attr_accessor :formulas_changed - - # The number of sheets changed. - # Corresponds to the JSON property `sheetsChanged` - # @return [Fixnum] - attr_accessor :sheets_changed - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @values_changed = args[:values_changed] if args.key?(:values_changed) - @rows_changed = args[:rows_changed] if args.key?(:rows_changed) - @occurrences_changed = args[:occurrences_changed] if args.key?(:occurrences_changed) - @formulas_changed = args[:formulas_changed] if args.key?(:formulas_changed) - @sheets_changed = args[:sheets_changed] if args.key?(:sheets_changed) - end - end - - # The response when updating a range of values in a spreadsheet. - class AppendValuesResponse - include Google::Apis::Core::Hashable - - # The spreadsheet the updates were applied to. - # Corresponds to the JSON property `spreadsheetId` - # @return [String] - attr_accessor :spreadsheet_id - - # The range (in A1 notation) of the table that values are being appended to - # (before the values were appended). - # Empty if no table was found. - # Corresponds to the JSON property `tableRange` - # @return [String] - attr_accessor :table_range - - # The response when updating a range of values in a spreadsheet. - # Corresponds to the JSON property `updates` - # @return [Google::Apis::SheetsV4::UpdateValuesResponse] - attr_accessor :updates - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) - @table_range = args[:table_range] if args.key?(:table_range) - @updates = args[:updates] if args.key?(:updates) - end - end - - # The format of a cell. - class CellFormat - include Google::Apis::Core::Hashable - - # The horizontal alignment of the value in the cell. - # Corresponds to the JSON property `horizontalAlignment` - # @return [String] - attr_accessor :horizontal_alignment - - # How a hyperlink, if it exists, should be displayed in the cell. - # Corresponds to the JSON property `hyperlinkDisplayType` - # @return [String] - attr_accessor :hyperlink_display_type - - # The borders of the cell. - # Corresponds to the JSON property `borders` - # @return [Google::Apis::SheetsV4::Borders] - attr_accessor :borders - - # The direction of the text in the cell. - # Corresponds to the JSON property `textDirection` - # @return [String] - attr_accessor :text_direction - - # The format of a run of text in a cell. - # Absent values indicate that the field isn't specified. - # Corresponds to the JSON property `textFormat` - # @return [Google::Apis::SheetsV4::TextFormat] - attr_accessor :text_format - - # The amount of padding around the cell, in pixels. - # When updating padding, every field must be specified. - # Corresponds to the JSON property `padding` - # @return [Google::Apis::SheetsV4::Padding] - attr_accessor :padding - - # The number format of a cell. - # Corresponds to the JSON property `numberFormat` - # @return [Google::Apis::SheetsV4::NumberFormat] - attr_accessor :number_format - - # The wrap strategy for the value in the cell. - # Corresponds to the JSON property `wrapStrategy` - # @return [String] - attr_accessor :wrap_strategy - - # Represents a color in the RGBA color space. This representation is designed - # for simplicity of conversion to/from color representations in various - # languages over compactness; for example, the fields of this representation - # can be trivially provided to the constructor of "java.awt.Color" in Java; it - # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" - # method in iOS; and, with just a little work, it can be easily formatted into - # a CSS "rgba()" string in JavaScript, as well. Here are some examples: - # Example (Java): - # import com.google.type.Color; - # // ... - # public static java.awt.Color fromProto(Color protocolor) ` - # float alpha = protocolor.hasAlpha() - # ? protocolor.getAlpha().getValue() - # : 1.0; - # return new java.awt.Color( - # protocolor.getRed(), - # protocolor.getGreen(), - # protocolor.getBlue(), - # alpha); - # ` - # public static Color toProto(java.awt.Color color) ` - # float red = (float) color.getRed(); - # float green = (float) color.getGreen(); - # float blue = (float) color.getBlue(); - # float denominator = 255.0; - # Color.Builder resultBuilder = - # Color - # .newBuilder() - # .setRed(red / denominator) - # .setGreen(green / denominator) - # .setBlue(blue / denominator); - # int alpha = color.getAlpha(); - # if (alpha != 255) ` - # result.setAlpha( - # FloatValue - # .newBuilder() - # .setValue(((float) alpha) / denominator) - # .build()); - # ` - # return resultBuilder.build(); - # ` - # // ... - # Example (iOS / Obj-C): - # // ... - # static UIColor* fromProto(Color* protocolor) ` - # float red = [protocolor red]; - # float green = [protocolor green]; - # float blue = [protocolor blue]; - # FloatValue* alpha_wrapper = [protocolor alpha]; - # float alpha = 1.0; - # if (alpha_wrapper != nil) ` - # alpha = [alpha_wrapper value]; - # ` - # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; - # ` - # static Color* toProto(UIColor* color) ` - # CGFloat red, green, blue, alpha; - # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) ` - # return nil; - # ` - # Color* result = [Color alloc] init]; - # [result setRed:red]; - # [result setGreen:green]; - # [result setBlue:blue]; - # if (alpha <= 0.9999) ` - # [result setAlpha:floatWrapperWithValue(alpha)]; - # ` - # [result autorelease]; - # return result; - # ` - # // ... - # Example (JavaScript): - # // ... - # var protoToCssColor = function(rgb_color) ` - # var redFrac = rgb_color.red || 0.0; - # var greenFrac = rgb_color.green || 0.0; - # var blueFrac = rgb_color.blue || 0.0; - # var red = Math.floor(redFrac * 255); - # var green = Math.floor(greenFrac * 255); - # var blue = Math.floor(blueFrac * 255); - # if (!('alpha' in rgb_color)) ` - # return rgbToCssColor_(red, green, blue); - # ` - # var alphaFrac = rgb_color.alpha.value || 0.0; - # var rgbParams = [red, green, blue].join(','); - # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); - # `; - # var rgbToCssColor_ = function(red, green, blue) ` - # var rgbNumber = new Number((red << 16) | (green << 8) | blue); - # var hexString = rgbNumber.toString(16); - # var missingZeros = 6 - hexString.length; - # var resultBuilder = ['#']; - # for (var i = 0; i < missingZeros; i++) ` - # resultBuilder.push('0'); - # ` - # resultBuilder.push(hexString); - # return resultBuilder.join(''); - # `; - # // ... - # Corresponds to the JSON property `backgroundColor` - # @return [Google::Apis::SheetsV4::Color] - attr_accessor :background_color - - # The vertical alignment of the value in the cell. - # Corresponds to the JSON property `verticalAlignment` - # @return [String] - attr_accessor :vertical_alignment - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @horizontal_alignment = args[:horizontal_alignment] if args.key?(:horizontal_alignment) - @hyperlink_display_type = args[:hyperlink_display_type] if args.key?(:hyperlink_display_type) - @borders = args[:borders] if args.key?(:borders) - @text_direction = args[:text_direction] if args.key?(:text_direction) - @text_format = args[:text_format] if args.key?(:text_format) - @padding = args[:padding] if args.key?(:padding) - @number_format = args[:number_format] if args.key?(:number_format) - @wrap_strategy = args[:wrap_strategy] if args.key?(:wrap_strategy) - @background_color = args[:background_color] if args.key?(:background_color) - @vertical_alignment = args[:vertical_alignment] if args.key?(:vertical_alignment) - end - end - - # Moves one or more rows or columns. - class MoveDimensionRequest - include Google::Apis::Core::Hashable - - # A range along a single dimension on a sheet. - # All indexes are zero-based. - # Indexes are half open: the start index is inclusive - # and the end index is exclusive. - # Missing indexes indicate the range is unbounded on that side. - # Corresponds to the JSON property `source` - # @return [Google::Apis::SheetsV4::DimensionRange] - attr_accessor :source - - # The zero-based start index of where to move the source data to, - # based on the coordinates *before* the source data is removed - # from the grid. Existing data will be shifted down or right - # (depending on the dimension) to make room for the moved dimensions. - # The source dimensions are removed from the grid, so the - # the data may end up in a different index than specified. - # For example, given `A1..A5` of `0, 1, 2, 3, 4` and wanting to move - # `"1"` and `"2"` to between `"3"` and `"4"`, the source would be - # `ROWS [1..3)`,and the destination index would be `"4"` - # (the zero-based index of row 5). - # The end result would be `A1..A5` of `0, 3, 1, 2, 4`. - # Corresponds to the JSON property `destinationIndex` - # @return [Fixnum] - attr_accessor :destination_index - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @source = args[:source] if args.key?(:source) - @destination_index = args[:destination_index] if args.key?(:destination_index) - end - end - - # An axis of the chart. - # A chart may not have more than one axis per - # axis position. - class BasicChartAxis - include Google::Apis::Core::Hashable - - # The position of this axis. - # Corresponds to the JSON property `position` - # @return [String] - attr_accessor :position - - # The title of this axis. If set, this overrides any title inferred - # from headers of the data. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # The format of a run of text in a cell. - # Absent values indicate that the field isn't specified. - # Corresponds to the JSON property `format` - # @return [Google::Apis::SheetsV4::TextFormat] - attr_accessor :format - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @position = args[:position] if args.key?(:position) - @title = args[:title] if args.key?(:title) - @format = args[:format] if args.key?(:format) + @destination_spreadsheet_id = args[:destination_spreadsheet_id] if args.key?(:destination_spreadsheet_id) end end @@ -2478,44 +196,17 @@ module Google end end - # Properties about a dimension. - class DimensionProperties - include Google::Apis::Core::Hashable - - # True if this dimension is explicitly hidden. - # Corresponds to the JSON property `hiddenByUser` - # @return [Boolean] - attr_accessor :hidden_by_user - alias_method :hidden_by_user?, :hidden_by_user - - # The height (if a row) or width (if a column) of the dimension in pixels. - # Corresponds to the JSON property `pixelSize` - # @return [Fixnum] - attr_accessor :pixel_size - - # True if this dimension is being filtered. - # This field is read-only. - # Corresponds to the JSON property `hiddenByFilter` - # @return [Boolean] - attr_accessor :hidden_by_filter - alias_method :hidden_by_filter?, :hidden_by_filter - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @hidden_by_user = args[:hidden_by_user] if args.key?(:hidden_by_user) - @pixel_size = args[:pixel_size] if args.key?(:pixel_size) - @hidden_by_filter = args[:hidden_by_filter] if args.key?(:hidden_by_filter) - end - end - # The position of an embedded object such as a chart. class EmbeddedObjectPosition include Google::Apis::Core::Hashable + # If true, the embedded object will be put on a new sheet whose ID + # is chosen for you. Used only when writing. + # Corresponds to the JSON property `newSheet` + # @return [Boolean] + attr_accessor :new_sheet + alias_method :new_sheet?, :new_sheet + # The sheet this is on. Set only if the embedded object # is on its own sheet. Must be non-negative. # Corresponds to the JSON property `sheetId` @@ -2527,12 +218,153 @@ module Google # @return [Google::Apis::SheetsV4::OverlayPosition] attr_accessor :overlay_position - # If true, the embedded object will be put on a new sheet whose ID - # is chosen for you. Used only when writing. - # Corresponds to the JSON property `newSheet` - # @return [Boolean] - attr_accessor :new_sheet - alias_method :new_sheet?, :new_sheet + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @new_sheet = args[:new_sheet] if args.key?(:new_sheet) + @sheet_id = args[:sheet_id] if args.key?(:sheet_id) + @overlay_position = args[:overlay_position] if args.key?(:overlay_position) + end + end + + # Deletes the protected range with the given ID. + class DeleteProtectedRangeRequest + include Google::Apis::Core::Hashable + + # The ID of the protected range to delete. + # Corresponds to the JSON property `protectedRangeId` + # @return [Fixnum] + attr_accessor :protected_range_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @protected_range_id = args[:protected_range_id] if args.key?(:protected_range_id) + end + end + + # Fills in more data based on existing data. + class AutoFillRequest + include Google::Apis::Core::Hashable + + # True if we should generate data with the "alternate" series. + # This differs based on the type and amount of source data. + # Corresponds to the JSON property `useAlternateSeries` + # @return [Boolean] + attr_accessor :use_alternate_series + alias_method :use_alternate_series?, :use_alternate_series + + # A combination of a source range and how to extend that source. + # Corresponds to the JSON property `sourceAndDestination` + # @return [Google::Apis::SheetsV4::SourceAndDestination] + attr_accessor :source_and_destination + + # A range on a sheet. + # All indexes are zero-based. + # Indexes are half open, e.g the start index is inclusive + # and the end index is exclusive -- [start_index, end_index). + # Missing indexes indicate the range is unbounded on that side. + # For example, if `"Sheet1"` is sheet ID 0, then: + # `Sheet1!A1:A1 == sheet_id: 0, + # start_row_index: 0, end_row_index: 1, + # start_column_index: 0, end_column_index: 1` + # `Sheet1!A3:B4 == sheet_id: 0, + # start_row_index: 2, end_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A:B == sheet_id: 0, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A5:B == sheet_id: 0, + # start_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1 == sheet_id:0` + # The start index must always be less than or equal to the end index. + # If the start index equals the end index, then the range is empty. + # Empty ranges are typically not meaningful and are usually rendered in the + # UI as `#REF!`. + # Corresponds to the JSON property `range` + # @return [Google::Apis::SheetsV4::GridRange] + attr_accessor :range + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @use_alternate_series = args[:use_alternate_series] if args.key?(:use_alternate_series) + @source_and_destination = args[:source_and_destination] if args.key?(:source_and_destination) + @range = args[:range] if args.key?(:range) + end + end + + # A rule that applies a gradient color scale format, based on + # the interpolation points listed. The format of a cell will vary + # based on its contents as compared to the values of the interpolation + # points. + class GradientRule + include Google::Apis::Core::Hashable + + # A single interpolation point on a gradient conditional format. + # These pin the gradient color scale according to the color, + # type and value chosen. + # Corresponds to the JSON property `minpoint` + # @return [Google::Apis::SheetsV4::InterpolationPoint] + attr_accessor :minpoint + + # A single interpolation point on a gradient conditional format. + # These pin the gradient color scale according to the color, + # type and value chosen. + # Corresponds to the JSON property `maxpoint` + # @return [Google::Apis::SheetsV4::InterpolationPoint] + attr_accessor :maxpoint + + # A single interpolation point on a gradient conditional format. + # These pin the gradient color scale according to the color, + # type and value chosen. + # Corresponds to the JSON property `midpoint` + # @return [Google::Apis::SheetsV4::InterpolationPoint] + attr_accessor :midpoint + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @minpoint = args[:minpoint] if args.key?(:minpoint) + @maxpoint = args[:maxpoint] if args.key?(:maxpoint) + @midpoint = args[:midpoint] if args.key?(:midpoint) + end + end + + # Sets the basic filter associated with a sheet. + class SetBasicFilterRequest + include Google::Apis::Core::Hashable + + # The default filter associated with a sheet. + # Corresponds to the JSON property `filter` + # @return [Google::Apis::SheetsV4::BasicFilter] + attr_accessor :filter + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @filter = args[:filter] if args.key?(:filter) + end + end + + # The request for clearing a range of values in a spreadsheet. + class ClearValuesRequest + include Google::Apis::Core::Hashable def initialize(**args) update!(**args) @@ -2540,9 +372,6 @@ module Google # Update properties of this object def update!(**args) - @sheet_id = args[:sheet_id] if args.key?(:sheet_id) - @overlay_position = args[:overlay_position] if args.key?(:overlay_position) - @new_sheet = args[:new_sheet] if args.key?(:new_sheet) end end @@ -2552,13 +381,6 @@ module Google class InterpolationPoint include Google::Apis::Core::Hashable - # The value this interpolation point uses. May be a formula. - # Unused if type is MIN or - # MAX. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - # Represents a color in the RGBA color space. This representation is designed # for simplicity of conversion to/from color representations in various # languages over compactness; for example, the fields of this representation @@ -2667,32 +489,55 @@ module Google # @return [String] attr_accessor :type + # The value this interpolation point uses. May be a formula. + # Unused if type is MIN or + # MAX. + # Corresponds to the JSON property `value` + # @return [String] + attr_accessor :value + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @value = args[:value] if args.key?(:value) @color = args[:color] if args.key?(:color) @type = args[:type] if args.key?(:type) + @value = args[:value] if args.key?(:value) end end - # An error in a cell. - class ErrorValue + # The result of the find/replace. + class FindReplaceResponse include Google::Apis::Core::Hashable - # The type of error. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type + # The number of non-formula cells changed. + # Corresponds to the JSON property `valuesChanged` + # @return [Fixnum] + attr_accessor :values_changed - # A message with more information about the error - # (in the spreadsheet's locale). - # Corresponds to the JSON property `message` - # @return [String] - attr_accessor :message + # The number of occurrences (possibly multiple within a cell) changed. + # For example, if replacing `"e"` with `"o"` in `"Google Sheets"`, this would + # be `"3"` because `"Google Sheets"` -> `"Googlo Shoots"`. + # Corresponds to the JSON property `occurrencesChanged` + # @return [Fixnum] + attr_accessor :occurrences_changed + + # The number of rows changed. + # Corresponds to the JSON property `rowsChanged` + # @return [Fixnum] + attr_accessor :rows_changed + + # The number of sheets changed. + # Corresponds to the JSON property `sheetsChanged` + # @return [Fixnum] + attr_accessor :sheets_changed + + # The number of formula cells changed. + # Corresponds to the JSON property `formulasChanged` + # @return [Fixnum] + attr_accessor :formulas_changed def initialize(**args) update!(**args) @@ -2700,8 +545,49 @@ module Google # Update properties of this object def update!(**args) - @type = args[:type] if args.key?(:type) - @message = args[:message] if args.key?(:message) + @values_changed = args[:values_changed] if args.key?(:values_changed) + @occurrences_changed = args[:occurrences_changed] if args.key?(:occurrences_changed) + @rows_changed = args[:rows_changed] if args.key?(:rows_changed) + @sheets_changed = args[:sheets_changed] if args.key?(:sheets_changed) + @formulas_changed = args[:formulas_changed] if args.key?(:formulas_changed) + end + end + + # Deletes the embedded object with the given ID. + class DeleteEmbeddedObjectRequest + include Google::Apis::Core::Hashable + + # The ID of the embedded object to delete. + # Corresponds to the JSON property `objectId` + # @return [Fixnum] + attr_accessor :object_id_prop + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) + end + end + + # Deletes the requested sheet. + class DeleteSheetRequest + include Google::Apis::Core::Hashable + + # The ID of the sheet to delete. + # Corresponds to the JSON property `sheetId` + # @return [Fixnum] + attr_accessor :sheet_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @sheet_id = args[:sheet_id] if args.key?(:sheet_id) end end @@ -2724,35 +610,30 @@ module Google end end - # The request for updating any aspect of a spreadsheet. - class BatchUpdateSpreadsheetRequest + # The result of updating a conditional format rule. + class UpdateConditionalFormatRuleResponse include Google::Apis::Core::Hashable - # Determines if the update response should include the spreadsheet - # resource. - # Corresponds to the JSON property `includeSpreadsheetInResponse` - # @return [Boolean] - attr_accessor :include_spreadsheet_in_response - alias_method :include_spreadsheet_in_response?, :include_spreadsheet_in_response + # The old index of the rule. Not set if a rule was replaced + # (because it is the same as new_index). + # Corresponds to the JSON property `oldIndex` + # @return [Fixnum] + attr_accessor :old_index - # A list of updates to apply to the spreadsheet. - # Corresponds to the JSON property `requests` - # @return [Array] - attr_accessor :requests + # A rule describing a conditional format. + # Corresponds to the JSON property `newRule` + # @return [Google::Apis::SheetsV4::ConditionalFormatRule] + attr_accessor :new_rule - # Limits the ranges included in the response spreadsheet. - # Meaningful only if include_spreadsheet_response is 'true'. - # Corresponds to the JSON property `responseRanges` - # @return [Array] - attr_accessor :response_ranges + # A rule describing a conditional format. + # Corresponds to the JSON property `oldRule` + # @return [Google::Apis::SheetsV4::ConditionalFormatRule] + attr_accessor :old_rule - # True if grid data should be returned. Meaningful only if - # if include_spreadsheet_response is 'true'. - # This parameter is ignored if a field mask was set in the request. - # Corresponds to the JSON property `responseIncludeGridData` - # @return [Boolean] - attr_accessor :response_include_grid_data - alias_method :response_include_grid_data?, :response_include_grid_data + # The index of the new rule. + # Corresponds to the JSON property `newIndex` + # @return [Fixnum] + attr_accessor :new_index def initialize(**args) update!(**args) @@ -2760,58 +641,373 @@ module Google # Update properties of this object def update!(**args) - @include_spreadsheet_in_response = args[:include_spreadsheet_in_response] if args.key?(:include_spreadsheet_in_response) - @requests = args[:requests] if args.key?(:requests) - @response_ranges = args[:response_ranges] if args.key?(:response_ranges) - @response_include_grid_data = args[:response_include_grid_data] if args.key?(:response_include_grid_data) + @old_index = args[:old_index] if args.key?(:old_index) + @new_rule = args[:new_rule] if args.key?(:new_rule) + @old_rule = args[:old_rule] if args.key?(:old_rule) + @new_index = args[:new_index] if args.key?(:new_index) end end - # Properties of a sheet. - class SheetProperties + # The value of the condition. + class ConditionValue include Google::Apis::Core::Hashable - # The name of the sheet. - # Corresponds to the JSON property `title` + # A relative date (based on the current date). + # Valid only if the type is + # DATE_BEFORE, + # DATE_AFTER, + # DATE_ON_OR_BEFORE or + # DATE_ON_OR_AFTER. + # Relative dates are not supported in data validation. + # They are supported only in conditional formatting and + # conditional filters. + # Corresponds to the JSON property `relativeDate` # @return [String] - attr_accessor :title + attr_accessor :relative_date - # The index of the sheet within the spreadsheet. - # When adding or updating sheet properties, if this field - # is excluded then the sheet will be added or moved to the end - # of the sheet list. When updating sheet indices or inserting - # sheets, movement is considered in "before the move" indexes. - # For example, if there were 3 sheets (S1, S2, S3) in order to - # move S1 ahead of S2 the index would have to be set to 2. A sheet - # index update request will be ignored if the requested index is - # identical to the sheets current index or if the requested new - # index is equal to the current sheet index + 1. - # Corresponds to the JSON property `index` + # A value the condition is based on. + # The value will be parsed as if the user typed into a cell. + # Formulas are supported (and must begin with an `=`). + # Corresponds to the JSON property `userEnteredValue` + # @return [String] + attr_accessor :user_entered_value + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @relative_date = args[:relative_date] if args.key?(:relative_date) + @user_entered_value = args[:user_entered_value] if args.key?(:user_entered_value) + end + end + + # Duplicates the contents of a sheet. + class DuplicateSheetRequest + include Google::Apis::Core::Hashable + + # The name of the new sheet. If empty, a new name is chosen for you. + # Corresponds to the JSON property `newSheetName` + # @return [String] + attr_accessor :new_sheet_name + + # The sheet to duplicate. + # Corresponds to the JSON property `sourceSheetId` # @return [Fixnum] - attr_accessor :index + attr_accessor :source_sheet_id - # True if the sheet is hidden in the UI, false if it's visible. - # Corresponds to the JSON property `hidden` - # @return [Boolean] - attr_accessor :hidden - alias_method :hidden?, :hidden - - # Properties of a grid. - # Corresponds to the JSON property `gridProperties` - # @return [Google::Apis::SheetsV4::GridProperties] - attr_accessor :grid_properties - - # The ID of the sheet. Must be non-negative. - # This field cannot be changed once set. - # Corresponds to the JSON property `sheetId` + # If set, the ID of the new sheet. If not set, an ID is chosen. + # If set, the ID must not conflict with any existing sheet ID. + # If set, it must be non-negative. + # Corresponds to the JSON property `newSheetId` # @return [Fixnum] - attr_accessor :sheet_id + attr_accessor :new_sheet_id - # True if the sheet is an RTL sheet instead of an LTR sheet. - # Corresponds to the JSON property `rightToLeft` + # The zero-based index where the new sheet should be inserted. + # The index of all sheets after this are incremented. + # Corresponds to the JSON property `insertSheetIndex` + # @return [Fixnum] + attr_accessor :insert_sheet_index + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @new_sheet_name = args[:new_sheet_name] if args.key?(:new_sheet_name) + @source_sheet_id = args[:source_sheet_id] if args.key?(:source_sheet_id) + @new_sheet_id = args[:new_sheet_id] if args.key?(:new_sheet_id) + @insert_sheet_index = args[:insert_sheet_index] if args.key?(:insert_sheet_index) + end + end + + # The kinds of value that a cell in a spreadsheet can have. + class ExtendedValue + include Google::Apis::Core::Hashable + + # An error in a cell. + # Corresponds to the JSON property `errorValue` + # @return [Google::Apis::SheetsV4::ErrorValue] + attr_accessor :error_value + + # Represents a string value. + # Leading single quotes are not included. For example, if the user typed + # `'123` into the UI, this would be represented as a `stringValue` of + # `"123"`. + # Corresponds to the JSON property `stringValue` + # @return [String] + attr_accessor :string_value + + # Represents a boolean value. + # Corresponds to the JSON property `boolValue` # @return [Boolean] - attr_accessor :right_to_left - alias_method :right_to_left?, :right_to_left + attr_accessor :bool_value + alias_method :bool_value?, :bool_value + + # Represents a formula. + # Corresponds to the JSON property `formulaValue` + # @return [String] + attr_accessor :formula_value + + # Represents a double value. + # Note: Dates, Times and DateTimes are represented as doubles in + # "serial number" format. + # Corresponds to the JSON property `numberValue` + # @return [Float] + attr_accessor :number_value + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @error_value = args[:error_value] if args.key?(:error_value) + @string_value = args[:string_value] if args.key?(:string_value) + @bool_value = args[:bool_value] if args.key?(:bool_value) + @formula_value = args[:formula_value] if args.key?(:formula_value) + @number_value = args[:number_value] if args.key?(:number_value) + end + end + + # Adds a chart to a sheet in the spreadsheet. + class AddChartRequest + include Google::Apis::Core::Hashable + + # A chart embedded in a sheet. + # Corresponds to the JSON property `chart` + # @return [Google::Apis::SheetsV4::EmbeddedChart] + attr_accessor :chart + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @chart = args[:chart] if args.key?(:chart) + end + end + + # Resource that represents a spreadsheet. + class Spreadsheet + include Google::Apis::Core::Hashable + + # Properties of a spreadsheet. + # Corresponds to the JSON property `properties` + # @return [Google::Apis::SheetsV4::SpreadsheetProperties] + attr_accessor :properties + + # The ID of the spreadsheet. + # This field is read-only. + # Corresponds to the JSON property `spreadsheetId` + # @return [String] + attr_accessor :spreadsheet_id + + # The sheets that are part of a spreadsheet. + # Corresponds to the JSON property `sheets` + # @return [Array] + attr_accessor :sheets + + # The named ranges defined in a spreadsheet. + # Corresponds to the JSON property `namedRanges` + # @return [Array] + attr_accessor :named_ranges + + # The url of the spreadsheet. + # This field is read-only. + # Corresponds to the JSON property `spreadsheetUrl` + # @return [String] + attr_accessor :spreadsheet_url + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @properties = args[:properties] if args.key?(:properties) + @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) + @sheets = args[:sheets] if args.key?(:sheets) + @named_ranges = args[:named_ranges] if args.key?(:named_ranges) + @spreadsheet_url = args[:spreadsheet_url] if args.key?(:spreadsheet_url) + end + end + + # The response when updating a range of values in a spreadsheet. + class BatchClearValuesResponse + include Google::Apis::Core::Hashable + + # The ranges that were cleared, in A1 notation. + # (If the requests were for an unbounded range or a ranger larger + # than the bounds of the sheet, this will be the actual ranges + # that were cleared, bounded to the sheet's limits.) + # Corresponds to the JSON property `clearedRanges` + # @return [Array] + attr_accessor :cleared_ranges + + # The spreadsheet the updates were applied to. + # Corresponds to the JSON property `spreadsheetId` + # @return [String] + attr_accessor :spreadsheet_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @cleared_ranges = args[:cleared_ranges] if args.key?(:cleared_ranges) + @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) + end + end + + # A banded (alternating colors) range in a sheet. + class BandedRange + include Google::Apis::Core::Hashable + + # A range on a sheet. + # All indexes are zero-based. + # Indexes are half open, e.g the start index is inclusive + # and the end index is exclusive -- [start_index, end_index). + # Missing indexes indicate the range is unbounded on that side. + # For example, if `"Sheet1"` is sheet ID 0, then: + # `Sheet1!A1:A1 == sheet_id: 0, + # start_row_index: 0, end_row_index: 1, + # start_column_index: 0, end_column_index: 1` + # `Sheet1!A3:B4 == sheet_id: 0, + # start_row_index: 2, end_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A:B == sheet_id: 0, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A5:B == sheet_id: 0, + # start_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1 == sheet_id:0` + # The start index must always be less than or equal to the end index. + # If the start index equals the end index, then the range is empty. + # Empty ranges are typically not meaningful and are usually rendered in the + # UI as `#REF!`. + # Corresponds to the JSON property `range` + # @return [Google::Apis::SheetsV4::GridRange] + attr_accessor :range + + # The id of the banded range. + # Corresponds to the JSON property `bandedRangeId` + # @return [Fixnum] + attr_accessor :banded_range_id + + # Properties referring a single dimension (either row or column). If both + # BandedRange.row_properties and BandedRange.column_properties are + # set, the fill colors are applied to cells according to the following rules: + # * header_color and footer_color take priority over band colors. + # * first_band_color takes priority over second_band_color. + # * row_properties takes priority over column_properties. + # For example, the first row color takes priority over the first column + # color, but the first column color takes priority over the second row color. + # Similarly, the row header takes priority over the column header in the + # top left cell, but the column header takes priority over the first row + # color if the row header is not set. + # Corresponds to the JSON property `rowProperties` + # @return [Google::Apis::SheetsV4::BandingProperties] + attr_accessor :row_properties + + # Properties referring a single dimension (either row or column). If both + # BandedRange.row_properties and BandedRange.column_properties are + # set, the fill colors are applied to cells according to the following rules: + # * header_color and footer_color take priority over band colors. + # * first_band_color takes priority over second_band_color. + # * row_properties takes priority over column_properties. + # For example, the first row color takes priority over the first column + # color, but the first column color takes priority over the second row color. + # Similarly, the row header takes priority over the column header in the + # top left cell, but the column header takes priority over the first row + # color if the row header is not set. + # Corresponds to the JSON property `columnProperties` + # @return [Google::Apis::SheetsV4::BandingProperties] + attr_accessor :column_properties + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @range = args[:range] if args.key?(:range) + @banded_range_id = args[:banded_range_id] if args.key?(:banded_range_id) + @row_properties = args[:row_properties] if args.key?(:row_properties) + @column_properties = args[:column_properties] if args.key?(:column_properties) + end + end + + # Updates an existing protected range with the specified + # protectedRangeId. + class UpdateProtectedRangeRequest + include Google::Apis::Core::Hashable + + # A protected range. + # Corresponds to the JSON property `protectedRange` + # @return [Google::Apis::SheetsV4::ProtectedRange] + attr_accessor :protected_range + + # The fields that should be updated. At least one field must be specified. + # The root `protectedRange` is implied and should not be specified. + # A single `"*"` can be used as short-hand for listing every field. + # Corresponds to the JSON property `fields` + # @return [String] + attr_accessor :fields + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @protected_range = args[:protected_range] if args.key?(:protected_range) + @fields = args[:fields] if args.key?(:fields) + end + end + + # The format of a run of text in a cell. + # Absent values indicate that the field isn't specified. + class TextFormat + include Google::Apis::Core::Hashable + + # The font family. + # Corresponds to the JSON property `fontFamily` + # @return [String] + attr_accessor :font_family + + # True if the text has a strikethrough. + # Corresponds to the JSON property `strikethrough` + # @return [Boolean] + attr_accessor :strikethrough + alias_method :strikethrough?, :strikethrough + + # True if the text is italicized. + # Corresponds to the JSON property `italic` + # @return [Boolean] + attr_accessor :italic + alias_method :italic?, :italic + + # The size of the font. + # Corresponds to the JSON property `fontSize` + # @return [Fixnum] + attr_accessor :font_size + + # True if the text is underlined. + # Corresponds to the JSON property `underline` + # @return [Boolean] + attr_accessor :underline + alias_method :underline?, :underline + + # True if the text is bold. + # Corresponds to the JSON property `bold` + # @return [Boolean] + attr_accessor :bold + alias_method :bold?, :bold # Represents a color in the RGBA color space. This representation is designed # for simplicity of conversion to/from color representations in various @@ -2912,15 +1108,9 @@ module Google # return resultBuilder.join(''); # `; # // ... - # Corresponds to the JSON property `tabColor` + # Corresponds to the JSON property `foregroundColor` # @return [Google::Apis::SheetsV4::Color] - attr_accessor :tab_color - - # The type of sheet. Defaults to GRID. - # This field cannot be changed once set. - # Corresponds to the JSON property `sheetType` - # @return [String] - attr_accessor :sheet_type + attr_accessor :foreground_color def initialize(**args) update!(**args) @@ -2928,27 +1118,350 @@ module Google # Update properties of this object def update!(**args) - @title = args[:title] if args.key?(:title) - @index = args[:index] if args.key?(:index) - @hidden = args[:hidden] if args.key?(:hidden) - @grid_properties = args[:grid_properties] if args.key?(:grid_properties) - @sheet_id = args[:sheet_id] if args.key?(:sheet_id) - @right_to_left = args[:right_to_left] if args.key?(:right_to_left) - @tab_color = args[:tab_color] if args.key?(:tab_color) - @sheet_type = args[:sheet_type] if args.key?(:sheet_type) + @font_family = args[:font_family] if args.key?(:font_family) + @strikethrough = args[:strikethrough] if args.key?(:strikethrough) + @italic = args[:italic] if args.key?(:italic) + @font_size = args[:font_size] if args.key?(:font_size) + @underline = args[:underline] if args.key?(:underline) + @bold = args[:bold] if args.key?(:bold) + @foreground_color = args[:foreground_color] if args.key?(:foreground_color) end end - # The request for clearing a range of values in a spreadsheet. - class ClearValuesRequest + # The result of adding a sheet. + class AddSheetResponse include Google::Apis::Core::Hashable + # Properties of a sheet. + # Corresponds to the JSON property `properties` + # @return [Google::Apis::SheetsV4::SheetProperties] + attr_accessor :properties + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @properties = args[:properties] if args.key?(:properties) + end + end + + # The result of adding a filter view. + class AddFilterViewResponse + include Google::Apis::Core::Hashable + + # A filter view. + # Corresponds to the JSON property `filter` + # @return [Google::Apis::SheetsV4::FilterView] + attr_accessor :filter + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @filter = args[:filter] if args.key?(:filter) + end + end + + # Properties of a spreadsheet. + class SpreadsheetProperties + include Google::Apis::Core::Hashable + + # The locale of the spreadsheet in one of the following formats: + # * an ISO 639-1 language code such as `en` + # * an ISO 639-2 language code such as `fil`, if no 639-1 code exists + # * a combination of the ISO language code and country code, such as `en_US` + # Note: when updating this field, not all locales/languages are supported. + # Corresponds to the JSON property `locale` + # @return [String] + attr_accessor :locale + + # The amount of time to wait before volatile functions are recalculated. + # Corresponds to the JSON property `autoRecalc` + # @return [String] + attr_accessor :auto_recalc + + # The format of a cell. + # Corresponds to the JSON property `defaultFormat` + # @return [Google::Apis::SheetsV4::CellFormat] + attr_accessor :default_format + + # The title of the spreadsheet. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + # The time zone of the spreadsheet, in CLDR format such as + # `America/New_York`. If the time zone isn't recognized, this may + # be a custom time zone such as `GMT-07:00`. + # Corresponds to the JSON property `timeZone` + # @return [String] + attr_accessor :time_zone + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @locale = args[:locale] if args.key?(:locale) + @auto_recalc = args[:auto_recalc] if args.key?(:auto_recalc) + @default_format = args[:default_format] if args.key?(:default_format) + @title = args[:title] if args.key?(:title) + @time_zone = args[:time_zone] if args.key?(:time_zone) + end + end + + # The location an object is overlaid on top of a grid. + class OverlayPosition + include Google::Apis::Core::Hashable + + # The width of the object, in pixels. Defaults to 600. + # Corresponds to the JSON property `widthPixels` + # @return [Fixnum] + attr_accessor :width_pixels + + # The horizontal offset, in pixels, that the object is offset + # from the anchor cell. + # Corresponds to the JSON property `offsetXPixels` + # @return [Fixnum] + attr_accessor :offset_x_pixels + + # A coordinate in a sheet. + # All indexes are zero-based. + # Corresponds to the JSON property `anchorCell` + # @return [Google::Apis::SheetsV4::GridCoordinate] + attr_accessor :anchor_cell + + # The vertical offset, in pixels, that the object is offset + # from the anchor cell. + # Corresponds to the JSON property `offsetYPixels` + # @return [Fixnum] + attr_accessor :offset_y_pixels + + # The height of the object, in pixels. Defaults to 371. + # Corresponds to the JSON property `heightPixels` + # @return [Fixnum] + attr_accessor :height_pixels + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @width_pixels = args[:width_pixels] if args.key?(:width_pixels) + @offset_x_pixels = args[:offset_x_pixels] if args.key?(:offset_x_pixels) + @anchor_cell = args[:anchor_cell] if args.key?(:anchor_cell) + @offset_y_pixels = args[:offset_y_pixels] if args.key?(:offset_y_pixels) + @height_pixels = args[:height_pixels] if args.key?(:height_pixels) + end + end + + # Updates all cells in the range to the values in the given Cell object. + # Only the fields listed in the fields field are updated; others are + # unchanged. + # If writing a cell with a formula, the formula's ranges will automatically + # increment for each field in the range. + # For example, if writing a cell with formula `=A1` into range B2:C4, + # B2 would be `=A1`, B3 would be `=A2`, B4 would be `=A3`, + # C2 would be `=B1`, C3 would be `=B2`, C4 would be `=B3`. + # To keep the formula's ranges static, use the `$` indicator. + # For example, use the formula `=$A$1` to prevent both the row and the + # column from incrementing. + class RepeatCellRequest + include Google::Apis::Core::Hashable + + # A range on a sheet. + # All indexes are zero-based. + # Indexes are half open, e.g the start index is inclusive + # and the end index is exclusive -- [start_index, end_index). + # Missing indexes indicate the range is unbounded on that side. + # For example, if `"Sheet1"` is sheet ID 0, then: + # `Sheet1!A1:A1 == sheet_id: 0, + # start_row_index: 0, end_row_index: 1, + # start_column_index: 0, end_column_index: 1` + # `Sheet1!A3:B4 == sheet_id: 0, + # start_row_index: 2, end_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A:B == sheet_id: 0, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A5:B == sheet_id: 0, + # start_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1 == sheet_id:0` + # The start index must always be less than or equal to the end index. + # If the start index equals the end index, then the range is empty. + # Empty ranges are typically not meaningful and are usually rendered in the + # UI as `#REF!`. + # Corresponds to the JSON property `range` + # @return [Google::Apis::SheetsV4::GridRange] + attr_accessor :range + + # The fields that should be updated. At least one field must be specified. + # The root `cell` is implied and should not be specified. + # A single `"*"` can be used as short-hand for listing every field. + # Corresponds to the JSON property `fields` + # @return [String] + attr_accessor :fields + + # Data about a specific cell. + # Corresponds to the JSON property `cell` + # @return [Google::Apis::SheetsV4::CellData] + attr_accessor :cell + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @range = args[:range] if args.key?(:range) + @fields = args[:fields] if args.key?(:fields) + @cell = args[:cell] if args.key?(:cell) + end + end + + # The result of adding a chart to a spreadsheet. + class AddChartResponse + include Google::Apis::Core::Hashable + + # A chart embedded in a sheet. + # Corresponds to the JSON property `chart` + # @return [Google::Apis::SheetsV4::EmbeddedChart] + attr_accessor :chart + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @chart = args[:chart] if args.key?(:chart) + end + end + + # Inserts rows or columns in a sheet at a particular index. + class InsertDimensionRequest + include Google::Apis::Core::Hashable + + # Whether dimension properties should be extended from the dimensions + # before or after the newly inserted dimensions. + # True to inherit from the dimensions before (in which case the start + # index must be greater than 0), and false to inherit from the dimensions + # after. + # For example, if row index 0 has red background and row index 1 + # has a green background, then inserting 2 rows at index 1 can inherit + # either the green or red background. If `inheritFromBefore` is true, + # the two new rows will be red (because the row before the insertion point + # was red), whereas if `inheritFromBefore` is false, the two new rows will + # be green (because the row after the insertion point was green). + # Corresponds to the JSON property `inheritFromBefore` + # @return [Boolean] + attr_accessor :inherit_from_before + alias_method :inherit_from_before?, :inherit_from_before + + # A range along a single dimension on a sheet. + # All indexes are zero-based. + # Indexes are half open: the start index is inclusive + # and the end index is exclusive. + # Missing indexes indicate the range is unbounded on that side. + # Corresponds to the JSON property `range` + # @return [Google::Apis::SheetsV4::DimensionRange] + attr_accessor :range + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @inherit_from_before = args[:inherit_from_before] if args.key?(:inherit_from_before) + @range = args[:range] if args.key?(:range) + end + end + + # Updates properties of a spreadsheet. + class UpdateSpreadsheetPropertiesRequest + include Google::Apis::Core::Hashable + + # The fields that should be updated. At least one field must be specified. + # The root 'properties' is implied and should not be specified. + # A single `"*"` can be used as short-hand for listing every field. + # Corresponds to the JSON property `fields` + # @return [String] + attr_accessor :fields + + # Properties of a spreadsheet. + # Corresponds to the JSON property `properties` + # @return [Google::Apis::SheetsV4::SpreadsheetProperties] + attr_accessor :properties + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @fields = args[:fields] if args.key?(:fields) + @properties = args[:properties] if args.key?(:properties) + end + end + + # The request for updating more than one range of values in a spreadsheet. + class BatchUpdateValuesRequest + include Google::Apis::Core::Hashable + + # How the input data should be interpreted. + # Corresponds to the JSON property `valueInputOption` + # @return [String] + attr_accessor :value_input_option + + # The new values to apply to the spreadsheet. + # Corresponds to the JSON property `data` + # @return [Array] + attr_accessor :data + + # Determines how dates, times, and durations in the response should be + # rendered. This is ignored if response_value_render_option is + # FORMATTED_VALUE. + # The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER]. + # Corresponds to the JSON property `responseDateTimeRenderOption` + # @return [String] + attr_accessor :response_date_time_render_option + + # Determines how values in the response should be rendered. + # The default render option is ValueRenderOption.FORMATTED_VALUE. + # Corresponds to the JSON property `responseValueRenderOption` + # @return [String] + attr_accessor :response_value_render_option + + # Determines if the update response should include the values + # of the cells that were updated. By default, responses + # do not include the updated values. The `updatedData` field within + # each of the BatchUpdateValuesResponse.responses will contain + # the updated values. If the range to write was larger than than the range + # actually written, the response will include all values in the requested + # range (excluding trailing empty rows and columns). + # Corresponds to the JSON property `includeValuesInResponse` + # @return [Boolean] + attr_accessor :include_values_in_response + alias_method :include_values_in_response?, :include_values_in_response + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @value_input_option = args[:value_input_option] if args.key?(:value_input_option) + @data = args[:data] if args.key?(:data) + @response_date_time_render_option = args[:response_date_time_render_option] if args.key?(:response_date_time_render_option) + @response_value_render_option = args[:response_value_render_option] if args.key?(:response_value_render_option) + @include_values_in_response = args[:include_values_in_response] if args.key?(:include_values_in_response) end end @@ -2956,24 +1469,6 @@ module Google class ProtectedRange include Google::Apis::Core::Hashable - # The list of unprotected ranges within a protected sheet. - # Unprotected ranges are only supported on protected sheets. - # Corresponds to the JSON property `unprotectedRanges` - # @return [Array] - attr_accessor :unprotected_ranges - - # The description of this protected range. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # The named range this protected range is backed by, if any. - # When writing, only one of range or named_range_id - # may be set. - # Corresponds to the JSON property `namedRangeId` - # @return [String] - attr_accessor :named_range_id - # True if the user who requested this protected range can edit the # protected area. # This field is read-only. @@ -2982,11 +1477,55 @@ module Google attr_accessor :requesting_user_can_edit alias_method :requesting_user_can_edit?, :requesting_user_can_edit + # A range on a sheet. + # All indexes are zero-based. + # Indexes are half open, e.g the start index is inclusive + # and the end index is exclusive -- [start_index, end_index). + # Missing indexes indicate the range is unbounded on that side. + # For example, if `"Sheet1"` is sheet ID 0, then: + # `Sheet1!A1:A1 == sheet_id: 0, + # start_row_index: 0, end_row_index: 1, + # start_column_index: 0, end_column_index: 1` + # `Sheet1!A3:B4 == sheet_id: 0, + # start_row_index: 2, end_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A:B == sheet_id: 0, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A5:B == sheet_id: 0, + # start_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1 == sheet_id:0` + # The start index must always be less than or equal to the end index. + # If the start index equals the end index, then the range is empty. + # Empty ranges are typically not meaningful and are usually rendered in the + # UI as `#REF!`. + # Corresponds to the JSON property `range` + # @return [Google::Apis::SheetsV4::GridRange] + attr_accessor :range + # The editors of a protected range. # Corresponds to the JSON property `editors` # @return [Google::Apis::SheetsV4::Editors] attr_accessor :editors + # The description of this protected range. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # The list of unprotected ranges within a protected sheet. + # Unprotected ranges are only supported on protected sheets. + # Corresponds to the JSON property `unprotectedRanges` + # @return [Array] + attr_accessor :unprotected_ranges + + # The named range this protected range is backed by, if any. + # When writing, only one of range or named_range_id + # may be set. + # Corresponds to the JSON property `namedRangeId` + # @return [String] + attr_accessor :named_range_id + # The ID of the protected range. # This field is read-only. # Corresponds to the JSON property `protectedRangeId` @@ -3006,31 +1545,44 @@ module Google attr_accessor :warning_only alias_method :warning_only?, :warning_only - # A range on a sheet. - # All indexes are zero-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if `"Sheet1"` is sheet ID 0, then: - # `Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1` - # `Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1 == sheet_id:0` - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as `#REF!`. - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV4::GridRange] - attr_accessor :range + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @requesting_user_can_edit = args[:requesting_user_can_edit] if args.key?(:requesting_user_can_edit) + @range = args[:range] if args.key?(:range) + @editors = args[:editors] if args.key?(:editors) + @description = args[:description] if args.key?(:description) + @unprotected_ranges = args[:unprotected_ranges] if args.key?(:unprotected_ranges) + @named_range_id = args[:named_range_id] if args.key?(:named_range_id) + @protected_range_id = args[:protected_range_id] if args.key?(:protected_range_id) + @warning_only = args[:warning_only] if args.key?(:warning_only) + end + end + + # Properties about a dimension. + class DimensionProperties + include Google::Apis::Core::Hashable + + # The height (if a row) or width (if a column) of the dimension in pixels. + # Corresponds to the JSON property `pixelSize` + # @return [Fixnum] + attr_accessor :pixel_size + + # True if this dimension is being filtered. + # This field is read-only. + # Corresponds to the JSON property `hiddenByFilter` + # @return [Boolean] + attr_accessor :hidden_by_filter + alias_method :hidden_by_filter?, :hidden_by_filter + + # True if this dimension is explicitly hidden. + # Corresponds to the JSON property `hiddenByUser` + # @return [Boolean] + attr_accessor :hidden_by_user + alias_method :hidden_by_user?, :hidden_by_user def initialize(**args) update!(**args) @@ -3038,31 +1590,39 @@ module Google # Update properties of this object def update!(**args) - @unprotected_ranges = args[:unprotected_ranges] if args.key?(:unprotected_ranges) - @description = args[:description] if args.key?(:description) - @named_range_id = args[:named_range_id] if args.key?(:named_range_id) - @requesting_user_can_edit = args[:requesting_user_can_edit] if args.key?(:requesting_user_can_edit) - @editors = args[:editors] if args.key?(:editors) - @protected_range_id = args[:protected_range_id] if args.key?(:protected_range_id) - @warning_only = args[:warning_only] if args.key?(:warning_only) - @range = args[:range] if args.key?(:range) + @pixel_size = args[:pixel_size] if args.key?(:pixel_size) + @hidden_by_filter = args[:hidden_by_filter] if args.key?(:hidden_by_filter) + @hidden_by_user = args[:hidden_by_user] if args.key?(:hidden_by_user) end end - # Deletes a conditional format rule at the given index. - # All subsequent rules' indexes are decremented. - class DeleteConditionalFormatRuleRequest + # A range along a single dimension on a sheet. + # All indexes are zero-based. + # Indexes are half open: the start index is inclusive + # and the end index is exclusive. + # Missing indexes indicate the range is unbounded on that side. + class DimensionRange include Google::Apis::Core::Hashable - # The sheet the rule is being deleted from. + # The sheet this span is on. # Corresponds to the JSON property `sheetId` # @return [Fixnum] attr_accessor :sheet_id - # The zero-based index of the rule to be deleted. - # Corresponds to the JSON property `index` + # The dimension of the span. + # Corresponds to the JSON property `dimension` + # @return [String] + attr_accessor :dimension + + # The start (inclusive) of the span, or not set if unbounded. + # Corresponds to the JSON property `startIndex` # @return [Fixnum] - attr_accessor :index + attr_accessor :start_index + + # The end (exclusive) of the span, or not set if unbounded. + # Corresponds to the JSON property `endIndex` + # @return [Fixnum] + attr_accessor :end_index def initialize(**args) update!(**args) @@ -3071,21 +1631,25 @@ module Google # Update properties of this object def update!(**args) @sheet_id = args[:sheet_id] if args.key?(:sheet_id) - @index = args[:index] if args.key?(:index) + @dimension = args[:dimension] if args.key?(:dimension) + @start_index = args[:start_index] if args.key?(:start_index) + @end_index = args[:end_index] if args.key?(:end_index) end end - # Deletes a range of cells, shifting other cells into the deleted area. - class DeleteRangeRequest + # A named range. + class NamedRange include Google::Apis::Core::Hashable - # The dimension from which deleted cells will be replaced with. - # If ROWS, existing cells will be shifted upward to - # replace the deleted cells. If COLUMNS, existing cells - # will be shifted left to replace the deleted cells. - # Corresponds to the JSON property `shiftDimension` + # The name of the named range. + # Corresponds to the JSON property `name` # @return [String] - attr_accessor :shift_dimension + attr_accessor :name + + # The ID of the named range. + # Corresponds to the JSON property `namedRangeId` + # @return [String] + attr_accessor :named_range_id # A range on a sheet. # All indexes are zero-based. @@ -3119,11 +1683,1080 @@ module Google # Update properties of this object def update!(**args) - @shift_dimension = args[:shift_dimension] if args.key?(:shift_dimension) + @name = args[:name] if args.key?(:name) + @named_range_id = args[:named_range_id] if args.key?(:named_range_id) @range = args[:range] if args.key?(:range) end end + # Moves data from the source to the destination. + class CutPasteRequest + include Google::Apis::Core::Hashable + + # A coordinate in a sheet. + # All indexes are zero-based. + # Corresponds to the JSON property `destination` + # @return [Google::Apis::SheetsV4::GridCoordinate] + attr_accessor :destination + + # A range on a sheet. + # All indexes are zero-based. + # Indexes are half open, e.g the start index is inclusive + # and the end index is exclusive -- [start_index, end_index). + # Missing indexes indicate the range is unbounded on that side. + # For example, if `"Sheet1"` is sheet ID 0, then: + # `Sheet1!A1:A1 == sheet_id: 0, + # start_row_index: 0, end_row_index: 1, + # start_column_index: 0, end_column_index: 1` + # `Sheet1!A3:B4 == sheet_id: 0, + # start_row_index: 2, end_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A:B == sheet_id: 0, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A5:B == sheet_id: 0, + # start_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1 == sheet_id:0` + # The start index must always be less than or equal to the end index. + # If the start index equals the end index, then the range is empty. + # Empty ranges are typically not meaningful and are usually rendered in the + # UI as `#REF!`. + # Corresponds to the JSON property `source` + # @return [Google::Apis::SheetsV4::GridRange] + attr_accessor :source + + # What kind of data to paste. All the source data will be cut, regardless + # of what is pasted. + # Corresponds to the JSON property `pasteType` + # @return [String] + attr_accessor :paste_type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @destination = args[:destination] if args.key?(:destination) + @source = args[:source] if args.key?(:source) + @paste_type = args[:paste_type] if args.key?(:paste_type) + end + end + + # A single series of data in a chart. + # For example, if charting stock prices over time, multiple series may exist, + # one for the "Open Price", "High Price", "Low Price" and "Close Price". + class BasicChartSeries + include Google::Apis::Core::Hashable + + # The data included in a domain or series. + # Corresponds to the JSON property `series` + # @return [Google::Apis::SheetsV4::ChartData] + attr_accessor :series + + # The type of this series. Valid only if the + # chartType is + # COMBO. + # Different types will change the way the series is visualized. + # Only LINE, AREA, + # and COLUMN are supported. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # The minor axis that will specify the range of values for this series. + # For example, if charting stocks over time, the "Volume" series + # may want to be pinned to the right with the prices pinned to the left, + # because the scale of trading volume is different than the scale of + # prices. + # It is an error to specify an axis that isn't a valid minor axis + # for the chart's type. + # Corresponds to the JSON property `targetAxis` + # @return [String] + attr_accessor :target_axis + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @series = args[:series] if args.key?(:series) + @type = args[:type] if args.key?(:type) + @target_axis = args[:target_axis] if args.key?(:target_axis) + end + end + + # The borders of the cell. + class Borders + include Google::Apis::Core::Hashable + + # A border along a cell. + # Corresponds to the JSON property `right` + # @return [Google::Apis::SheetsV4::Border] + attr_accessor :right + + # A border along a cell. + # Corresponds to the JSON property `bottom` + # @return [Google::Apis::SheetsV4::Border] + attr_accessor :bottom + + # A border along a cell. + # Corresponds to the JSON property `top` + # @return [Google::Apis::SheetsV4::Border] + attr_accessor :top + + # A border along a cell. + # Corresponds to the JSON property `left` + # @return [Google::Apis::SheetsV4::Border] + attr_accessor :left + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @right = args[:right] if args.key?(:right) + @bottom = args[:bottom] if args.key?(:bottom) + @top = args[:top] if args.key?(:top) + @left = args[:left] if args.key?(:left) + end + end + + # Automatically resizes one or more dimensions based on the contents + # of the cells in that dimension. + class AutoResizeDimensionsRequest + include Google::Apis::Core::Hashable + + # A range along a single dimension on a sheet. + # All indexes are zero-based. + # Indexes are half open: the start index is inclusive + # and the end index is exclusive. + # Missing indexes indicate the range is unbounded on that side. + # Corresponds to the JSON property `dimensions` + # @return [Google::Apis::SheetsV4::DimensionRange] + attr_accessor :dimensions + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @dimensions = args[:dimensions] if args.key?(:dimensions) + end + end + + # Updates the borders of a range. + # If a field is not set in the request, that means the border remains as-is. + # For example, with two subsequent UpdateBordersRequest: + # 1. range: A1:A5 `` top: RED, bottom: WHITE `` + # 2. range: A1:A5 `` left: BLUE `` + # That would result in A1:A5 having a borders of + # `` top: RED, bottom: WHITE, left: BLUE ``. + # If you want to clear a border, explicitly set the style to + # NONE. + class UpdateBordersRequest + include Google::Apis::Core::Hashable + + # A border along a cell. + # Corresponds to the JSON property `bottom` + # @return [Google::Apis::SheetsV4::Border] + attr_accessor :bottom + + # A border along a cell. + # Corresponds to the JSON property `innerVertical` + # @return [Google::Apis::SheetsV4::Border] + attr_accessor :inner_vertical + + # A border along a cell. + # Corresponds to the JSON property `right` + # @return [Google::Apis::SheetsV4::Border] + attr_accessor :right + + # A range on a sheet. + # All indexes are zero-based. + # Indexes are half open, e.g the start index is inclusive + # and the end index is exclusive -- [start_index, end_index). + # Missing indexes indicate the range is unbounded on that side. + # For example, if `"Sheet1"` is sheet ID 0, then: + # `Sheet1!A1:A1 == sheet_id: 0, + # start_row_index: 0, end_row_index: 1, + # start_column_index: 0, end_column_index: 1` + # `Sheet1!A3:B4 == sheet_id: 0, + # start_row_index: 2, end_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A:B == sheet_id: 0, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A5:B == sheet_id: 0, + # start_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1 == sheet_id:0` + # The start index must always be less than or equal to the end index. + # If the start index equals the end index, then the range is empty. + # Empty ranges are typically not meaningful and are usually rendered in the + # UI as `#REF!`. + # Corresponds to the JSON property `range` + # @return [Google::Apis::SheetsV4::GridRange] + attr_accessor :range + + # A border along a cell. + # Corresponds to the JSON property `innerHorizontal` + # @return [Google::Apis::SheetsV4::Border] + attr_accessor :inner_horizontal + + # A border along a cell. + # Corresponds to the JSON property `top` + # @return [Google::Apis::SheetsV4::Border] + attr_accessor :top + + # A border along a cell. + # Corresponds to the JSON property `left` + # @return [Google::Apis::SheetsV4::Border] + attr_accessor :left + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @bottom = args[:bottom] if args.key?(:bottom) + @inner_vertical = args[:inner_vertical] if args.key?(:inner_vertical) + @right = args[:right] if args.key?(:right) + @range = args[:range] if args.key?(:range) + @inner_horizontal = args[:inner_horizontal] if args.key?(:inner_horizontal) + @top = args[:top] if args.key?(:top) + @left = args[:left] if args.key?(:left) + end + end + + # The format of a cell. + class CellFormat + include Google::Apis::Core::Hashable + + # The vertical alignment of the value in the cell. + # Corresponds to the JSON property `verticalAlignment` + # @return [String] + attr_accessor :vertical_alignment + + # The amount of padding around the cell, in pixels. + # When updating padding, every field must be specified. + # Corresponds to the JSON property `padding` + # @return [Google::Apis::SheetsV4::Padding] + attr_accessor :padding + + # The borders of the cell. + # Corresponds to the JSON property `borders` + # @return [Google::Apis::SheetsV4::Borders] + attr_accessor :borders + + # The direction of the text in the cell. + # Corresponds to the JSON property `textDirection` + # @return [String] + attr_accessor :text_direction + + # The wrap strategy for the value in the cell. + # Corresponds to the JSON property `wrapStrategy` + # @return [String] + attr_accessor :wrap_strategy + + # The number format of a cell. + # Corresponds to the JSON property `numberFormat` + # @return [Google::Apis::SheetsV4::NumberFormat] + attr_accessor :number_format + + # The horizontal alignment of the value in the cell. + # Corresponds to the JSON property `horizontalAlignment` + # @return [String] + attr_accessor :horizontal_alignment + + # How a hyperlink, if it exists, should be displayed in the cell. + # Corresponds to the JSON property `hyperlinkDisplayType` + # @return [String] + attr_accessor :hyperlink_display_type + + # The format of a run of text in a cell. + # Absent values indicate that the field isn't specified. + # Corresponds to the JSON property `textFormat` + # @return [Google::Apis::SheetsV4::TextFormat] + attr_accessor :text_format + + # Represents a color in the RGBA color space. This representation is designed + # for simplicity of conversion to/from color representations in various + # languages over compactness; for example, the fields of this representation + # can be trivially provided to the constructor of "java.awt.Color" in Java; it + # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" + # method in iOS; and, with just a little work, it can be easily formatted into + # a CSS "rgba()" string in JavaScript, as well. Here are some examples: + # Example (Java): + # import com.google.type.Color; + # // ... + # public static java.awt.Color fromProto(Color protocolor) ` + # float alpha = protocolor.hasAlpha() + # ? protocolor.getAlpha().getValue() + # : 1.0; + # return new java.awt.Color( + # protocolor.getRed(), + # protocolor.getGreen(), + # protocolor.getBlue(), + # alpha); + # ` + # public static Color toProto(java.awt.Color color) ` + # float red = (float) color.getRed(); + # float green = (float) color.getGreen(); + # float blue = (float) color.getBlue(); + # float denominator = 255.0; + # Color.Builder resultBuilder = + # Color + # .newBuilder() + # .setRed(red / denominator) + # .setGreen(green / denominator) + # .setBlue(blue / denominator); + # int alpha = color.getAlpha(); + # if (alpha != 255) ` + # result.setAlpha( + # FloatValue + # .newBuilder() + # .setValue(((float) alpha) / denominator) + # .build()); + # ` + # return resultBuilder.build(); + # ` + # // ... + # Example (iOS / Obj-C): + # // ... + # static UIColor* fromProto(Color* protocolor) ` + # float red = [protocolor red]; + # float green = [protocolor green]; + # float blue = [protocolor blue]; + # FloatValue* alpha_wrapper = [protocolor alpha]; + # float alpha = 1.0; + # if (alpha_wrapper != nil) ` + # alpha = [alpha_wrapper value]; + # ` + # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; + # ` + # static Color* toProto(UIColor* color) ` + # CGFloat red, green, blue, alpha; + # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) ` + # return nil; + # ` + # Color* result = [Color alloc] init]; + # [result setRed:red]; + # [result setGreen:green]; + # [result setBlue:blue]; + # if (alpha <= 0.9999) ` + # [result setAlpha:floatWrapperWithValue(alpha)]; + # ` + # [result autorelease]; + # return result; + # ` + # // ... + # Example (JavaScript): + # // ... + # var protoToCssColor = function(rgb_color) ` + # var redFrac = rgb_color.red || 0.0; + # var greenFrac = rgb_color.green || 0.0; + # var blueFrac = rgb_color.blue || 0.0; + # var red = Math.floor(redFrac * 255); + # var green = Math.floor(greenFrac * 255); + # var blue = Math.floor(blueFrac * 255); + # if (!('alpha' in rgb_color)) ` + # return rgbToCssColor_(red, green, blue); + # ` + # var alphaFrac = rgb_color.alpha.value || 0.0; + # var rgbParams = [red, green, blue].join(','); + # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); + # `; + # var rgbToCssColor_ = function(red, green, blue) ` + # var rgbNumber = new Number((red << 16) | (green << 8) | blue); + # var hexString = rgbNumber.toString(16); + # var missingZeros = 6 - hexString.length; + # var resultBuilder = ['#']; + # for (var i = 0; i < missingZeros; i++) ` + # resultBuilder.push('0'); + # ` + # resultBuilder.push(hexString); + # return resultBuilder.join(''); + # `; + # // ... + # Corresponds to the JSON property `backgroundColor` + # @return [Google::Apis::SheetsV4::Color] + attr_accessor :background_color + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @vertical_alignment = args[:vertical_alignment] if args.key?(:vertical_alignment) + @padding = args[:padding] if args.key?(:padding) + @borders = args[:borders] if args.key?(:borders) + @text_direction = args[:text_direction] if args.key?(:text_direction) + @wrap_strategy = args[:wrap_strategy] if args.key?(:wrap_strategy) + @number_format = args[:number_format] if args.key?(:number_format) + @horizontal_alignment = args[:horizontal_alignment] if args.key?(:horizontal_alignment) + @hyperlink_display_type = args[:hyperlink_display_type] if args.key?(:hyperlink_display_type) + @text_format = args[:text_format] if args.key?(:text_format) + @background_color = args[:background_color] if args.key?(:background_color) + end + end + + # The response when clearing a range of values in a spreadsheet. + class ClearValuesResponse + include Google::Apis::Core::Hashable + + # The spreadsheet the updates were applied to. + # Corresponds to the JSON property `spreadsheetId` + # @return [String] + attr_accessor :spreadsheet_id + + # The range (in A1 notation) that was cleared. + # (If the request was for an unbounded range or a ranger larger + # than the bounds of the sheet, this will be the actual range + # that was cleared, bounded to the sheet's limits.) + # Corresponds to the JSON property `clearedRange` + # @return [String] + attr_accessor :cleared_range + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) + @cleared_range = args[:cleared_range] if args.key?(:cleared_range) + end + end + + # Deletes a conditional format rule at the given index. + # All subsequent rules' indexes are decremented. + class DeleteConditionalFormatRuleRequest + include Google::Apis::Core::Hashable + + # The zero-based index of the rule to be deleted. + # Corresponds to the JSON property `index` + # @return [Fixnum] + attr_accessor :index + + # The sheet the rule is being deleted from. + # Corresponds to the JSON property `sheetId` + # @return [Fixnum] + attr_accessor :sheet_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @index = args[:index] if args.key?(:index) + @sheet_id = args[:sheet_id] if args.key?(:sheet_id) + end + end + + # Removes the named range with the given ID from the spreadsheet. + class DeleteNamedRangeRequest + include Google::Apis::Core::Hashable + + # The ID of the named range to delete. + # Corresponds to the JSON property `namedRangeId` + # @return [String] + attr_accessor :named_range_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @named_range_id = args[:named_range_id] if args.key?(:named_range_id) + end + end + + # The result of adding a banded range. + class AddBandingResponse + include Google::Apis::Core::Hashable + + # A banded (alternating colors) range in a sheet. + # Corresponds to the JSON property `bandedRange` + # @return [Google::Apis::SheetsV4::BandedRange] + attr_accessor :banded_range + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @banded_range = args[:banded_range] if args.key?(:banded_range) + end + end + + # The data included in a domain or series. + class ChartData + include Google::Apis::Core::Hashable + + # Source ranges for a chart. + # Corresponds to the JSON property `sourceRange` + # @return [Google::Apis::SheetsV4::ChartSourceRange] + attr_accessor :source_range + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @source_range = args[:source_range] if args.key?(:source_range) + end + end + + # The response when retrieving more than one range of values in a spreadsheet. + class BatchGetValuesResponse + include Google::Apis::Core::Hashable + + # The ID of the spreadsheet the data was retrieved from. + # Corresponds to the JSON property `spreadsheetId` + # @return [String] + attr_accessor :spreadsheet_id + + # The requested values. The order of the ValueRanges is the same as the + # order of the requested ranges. + # Corresponds to the JSON property `valueRanges` + # @return [Array] + attr_accessor :value_ranges + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) + @value_ranges = args[:value_ranges] if args.key?(:value_ranges) + end + end + + # Updates properties of the supplied banded range. + class UpdateBandingRequest + include Google::Apis::Core::Hashable + + # The fields that should be updated. At least one field must be specified. + # The root `bandedRange` is implied and should not be specified. + # A single `"*"` can be used as short-hand for listing every field. + # Corresponds to the JSON property `fields` + # @return [String] + attr_accessor :fields + + # A banded (alternating colors) range in a sheet. + # Corresponds to the JSON property `bandedRange` + # @return [Google::Apis::SheetsV4::BandedRange] + attr_accessor :banded_range + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @fields = args[:fields] if args.key?(:fields) + @banded_range = args[:banded_range] if args.key?(:banded_range) + end + end + + # Represents a color in the RGBA color space. This representation is designed + # for simplicity of conversion to/from color representations in various + # languages over compactness; for example, the fields of this representation + # can be trivially provided to the constructor of "java.awt.Color" in Java; it + # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" + # method in iOS; and, with just a little work, it can be easily formatted into + # a CSS "rgba()" string in JavaScript, as well. Here are some examples: + # Example (Java): + # import com.google.type.Color; + # // ... + # public static java.awt.Color fromProto(Color protocolor) ` + # float alpha = protocolor.hasAlpha() + # ? protocolor.getAlpha().getValue() + # : 1.0; + # return new java.awt.Color( + # protocolor.getRed(), + # protocolor.getGreen(), + # protocolor.getBlue(), + # alpha); + # ` + # public static Color toProto(java.awt.Color color) ` + # float red = (float) color.getRed(); + # float green = (float) color.getGreen(); + # float blue = (float) color.getBlue(); + # float denominator = 255.0; + # Color.Builder resultBuilder = + # Color + # .newBuilder() + # .setRed(red / denominator) + # .setGreen(green / denominator) + # .setBlue(blue / denominator); + # int alpha = color.getAlpha(); + # if (alpha != 255) ` + # result.setAlpha( + # FloatValue + # .newBuilder() + # .setValue(((float) alpha) / denominator) + # .build()); + # ` + # return resultBuilder.build(); + # ` + # // ... + # Example (iOS / Obj-C): + # // ... + # static UIColor* fromProto(Color* protocolor) ` + # float red = [protocolor red]; + # float green = [protocolor green]; + # float blue = [protocolor blue]; + # FloatValue* alpha_wrapper = [protocolor alpha]; + # float alpha = 1.0; + # if (alpha_wrapper != nil) ` + # alpha = [alpha_wrapper value]; + # ` + # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; + # ` + # static Color* toProto(UIColor* color) ` + # CGFloat red, green, blue, alpha; + # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) ` + # return nil; + # ` + # Color* result = [Color alloc] init]; + # [result setRed:red]; + # [result setGreen:green]; + # [result setBlue:blue]; + # if (alpha <= 0.9999) ` + # [result setAlpha:floatWrapperWithValue(alpha)]; + # ` + # [result autorelease]; + # return result; + # ` + # // ... + # Example (JavaScript): + # // ... + # var protoToCssColor = function(rgb_color) ` + # var redFrac = rgb_color.red || 0.0; + # var greenFrac = rgb_color.green || 0.0; + # var blueFrac = rgb_color.blue || 0.0; + # var red = Math.floor(redFrac * 255); + # var green = Math.floor(greenFrac * 255); + # var blue = Math.floor(blueFrac * 255); + # if (!('alpha' in rgb_color)) ` + # return rgbToCssColor_(red, green, blue); + # ` + # var alphaFrac = rgb_color.alpha.value || 0.0; + # var rgbParams = [red, green, blue].join(','); + # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); + # `; + # var rgbToCssColor_ = function(red, green, blue) ` + # var rgbNumber = new Number((red << 16) | (green << 8) | blue); + # var hexString = rgbNumber.toString(16); + # var missingZeros = 6 - hexString.length; + # var resultBuilder = ['#']; + # for (var i = 0; i < missingZeros; i++) ` + # resultBuilder.push('0'); + # ` + # resultBuilder.push(hexString); + # return resultBuilder.join(''); + # `; + # // ... + class Color + include Google::Apis::Core::Hashable + + # The amount of red in the color as a value in the interval [0, 1]. + # Corresponds to the JSON property `red` + # @return [Float] + attr_accessor :red + + # The amount of green in the color as a value in the interval [0, 1]. + # Corresponds to the JSON property `green` + # @return [Float] + attr_accessor :green + + # The amount of blue in the color as a value in the interval [0, 1]. + # Corresponds to the JSON property `blue` + # @return [Float] + attr_accessor :blue + + # The fraction of this color that should be applied to the pixel. That is, + # the final pixel color is defined by the equation: + # pixel color = alpha * (this color) + (1.0 - alpha) * (background color) + # This means that a value of 1.0 corresponds to a solid color, whereas + # a value of 0.0 corresponds to a completely transparent color. This + # uses a wrapper message rather than a simple float scalar so that it is + # possible to distinguish between a default value and the value being unset. + # If omitted, this color object is to be rendered as a solid color + # (as if the alpha value had been explicitly given with a value of 1.0). + # Corresponds to the JSON property `alpha` + # @return [Float] + attr_accessor :alpha + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @red = args[:red] if args.key?(:red) + @green = args[:green] if args.key?(:green) + @blue = args[:blue] if args.key?(:blue) + @alpha = args[:alpha] if args.key?(:alpha) + end + end + + # A single grouping (either row or column) in a pivot table. + class PivotGroup + include Google::Apis::Core::Hashable + + # The order the values in this group should be sorted. + # Corresponds to the JSON property `sortOrder` + # @return [String] + attr_accessor :sort_order + + # Information about which values in a pivot group should be used for sorting. + # Corresponds to the JSON property `valueBucket` + # @return [Google::Apis::SheetsV4::PivotGroupSortValueBucket] + attr_accessor :value_bucket + + # The column offset of the source range that this grouping is based on. + # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0` + # means this group refers to column `C`, whereas the offset `1` would refer + # to column `D`. + # Corresponds to the JSON property `sourceColumnOffset` + # @return [Fixnum] + attr_accessor :source_column_offset + + # True if the pivot table should include the totals for this grouping. + # Corresponds to the JSON property `showTotals` + # @return [Boolean] + attr_accessor :show_totals + alias_method :show_totals?, :show_totals + + # Metadata about values in the grouping. + # Corresponds to the JSON property `valueMetadata` + # @return [Array] + attr_accessor :value_metadata + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @sort_order = args[:sort_order] if args.key?(:sort_order) + @value_bucket = args[:value_bucket] if args.key?(:value_bucket) + @source_column_offset = args[:source_column_offset] if args.key?(:source_column_offset) + @show_totals = args[:show_totals] if args.key?(:show_totals) + @value_metadata = args[:value_metadata] if args.key?(:value_metadata) + end + end + + # A pivot table. + class PivotTable + include Google::Apis::Core::Hashable + + # Each row grouping in the pivot table. + # Corresponds to the JSON property `rows` + # @return [Array] + attr_accessor :rows + + # Whether values should be listed horizontally (as columns) + # or vertically (as rows). + # Corresponds to the JSON property `valueLayout` + # @return [String] + attr_accessor :value_layout + + # Each column grouping in the pivot table. + # Corresponds to the JSON property `columns` + # @return [Array] + attr_accessor :columns + + # A list of values to include in the pivot table. + # Corresponds to the JSON property `values` + # @return [Array] + attr_accessor :values + + # A range on a sheet. + # All indexes are zero-based. + # Indexes are half open, e.g the start index is inclusive + # and the end index is exclusive -- [start_index, end_index). + # Missing indexes indicate the range is unbounded on that side. + # For example, if `"Sheet1"` is sheet ID 0, then: + # `Sheet1!A1:A1 == sheet_id: 0, + # start_row_index: 0, end_row_index: 1, + # start_column_index: 0, end_column_index: 1` + # `Sheet1!A3:B4 == sheet_id: 0, + # start_row_index: 2, end_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A:B == sheet_id: 0, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A5:B == sheet_id: 0, + # start_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1 == sheet_id:0` + # The start index must always be less than or equal to the end index. + # If the start index equals the end index, then the range is empty. + # Empty ranges are typically not meaningful and are usually rendered in the + # UI as `#REF!`. + # Corresponds to the JSON property `source` + # @return [Google::Apis::SheetsV4::GridRange] + attr_accessor :source + + # An optional mapping of filters per source column offset. + # The filters will be applied before aggregating data into the pivot table. + # The map's key is the column offset of the source range that you want to + # filter, and the value is the criteria for that column. + # For example, if the source was `C10:E15`, a key of `0` will have the filter + # for column `C`, whereas the key `1` is for column `D`. + # Corresponds to the JSON property `criteria` + # @return [Hash] + attr_accessor :criteria + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @rows = args[:rows] if args.key?(:rows) + @value_layout = args[:value_layout] if args.key?(:value_layout) + @columns = args[:columns] if args.key?(:columns) + @values = args[:values] if args.key?(:values) + @source = args[:source] if args.key?(:source) + @criteria = args[:criteria] if args.key?(:criteria) + end + end + + # Source ranges for a chart. + class ChartSourceRange + include Google::Apis::Core::Hashable + + # The ranges of data for a series or domain. + # Exactly one dimension must have a length of 1, + # and all sources in the list must have the same dimension + # with length 1. + # The domain (if it exists) & all series must have the same number + # of source ranges. If using more than one source range, then the source + # range at a given offset must be contiguous across the domain and series. + # For example, these are valid configurations: + # domain sources: A1:A5 + # series1 sources: B1:B5 + # series2 sources: D6:D10 + # domain sources: A1:A5, C10:C12 + # series1 sources: B1:B5, D10:D12 + # series2 sources: C1:C5, E10:E12 + # Corresponds to the JSON property `sources` + # @return [Array] + attr_accessor :sources + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @sources = args[:sources] if args.key?(:sources) + end + end + + # Adds new cells after the last row with data in a sheet, + # inserting new rows into the sheet if necessary. + class AppendCellsRequest + include Google::Apis::Core::Hashable + + # The data to append. + # Corresponds to the JSON property `rows` + # @return [Array] + attr_accessor :rows + + # The fields of CellData that should be updated. + # At least one field must be specified. + # The root is the CellData; 'row.values.' should not be specified. + # A single `"*"` can be used as short-hand for listing every field. + # Corresponds to the JSON property `fields` + # @return [String] + attr_accessor :fields + + # The sheet ID to append the data to. + # Corresponds to the JSON property `sheetId` + # @return [Fixnum] + attr_accessor :sheet_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @rows = args[:rows] if args.key?(:rows) + @fields = args[:fields] if args.key?(:fields) + @sheet_id = args[:sheet_id] if args.key?(:sheet_id) + end + end + + # Data within a range of the spreadsheet. + class ValueRange + include Google::Apis::Core::Hashable + + # The major dimension of the values. + # For output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, + # then requesting `range=A1:B2,majorDimension=ROWS` will return + # `[[1,2],[3,4]]`, + # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return + # `[[1,3],[2,4]]`. + # For input, with `range=A1:B2,majorDimension=ROWS` then `[[1,2],[3,4]]` + # will set `A1=1,B1=2,A2=3,B2=4`. With `range=A1:B2,majorDimension=COLUMNS` + # then `[[1,2],[3,4]]` will set `A1=1,B1=3,A2=2,B2=4`. + # When writing, if this field is not set, it defaults to ROWS. + # Corresponds to the JSON property `majorDimension` + # @return [String] + attr_accessor :major_dimension + + # The data that was read or to be written. This is an array of arrays, + # the outer array representing all the data and each inner array + # representing a major dimension. Each item in the inner array + # corresponds with one cell. + # For output, empty trailing rows and columns will not be included. + # For input, supported value types are: bool, string, and double. + # Null values will be skipped. + # To set a cell to an empty value, set the string value to an empty string. + # Corresponds to the JSON property `values` + # @return [Array>] + attr_accessor :values + + # The range the values cover, in A1 notation. + # For output, this range indicates the entire requested range, + # even though the values will exclude trailing rows and columns. + # When appending values, this field represents the range to search for a + # table, after which values will be appended. + # Corresponds to the JSON property `range` + # @return [String] + attr_accessor :range + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @major_dimension = args[:major_dimension] if args.key?(:major_dimension) + @values = args[:values] if args.key?(:values) + @range = args[:range] if args.key?(:range) + end + end + + # Adds a new banded range to the spreadsheet. + class AddBandingRequest + include Google::Apis::Core::Hashable + + # A banded (alternating colors) range in a sheet. + # Corresponds to the JSON property `bandedRange` + # @return [Google::Apis::SheetsV4::BandedRange] + attr_accessor :banded_range + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @banded_range = args[:banded_range] if args.key?(:banded_range) + end + end + + # A single response from an update. + class Response + include Google::Apis::Core::Hashable + + # The result of adding a filter view. + # Corresponds to the JSON property `addFilterView` + # @return [Google::Apis::SheetsV4::AddFilterViewResponse] + attr_accessor :add_filter_view + + # The result of adding a banded range. + # Corresponds to the JSON property `addBanding` + # @return [Google::Apis::SheetsV4::AddBandingResponse] + attr_accessor :add_banding + + # The result of adding a new protected range. + # Corresponds to the JSON property `addProtectedRange` + # @return [Google::Apis::SheetsV4::AddProtectedRangeResponse] + attr_accessor :add_protected_range + + # The result of duplicating a sheet. + # Corresponds to the JSON property `duplicateSheet` + # @return [Google::Apis::SheetsV4::DuplicateSheetResponse] + attr_accessor :duplicate_sheet + + # The result of updating an embedded object's position. + # Corresponds to the JSON property `updateEmbeddedObjectPosition` + # @return [Google::Apis::SheetsV4::UpdateEmbeddedObjectPositionResponse] + attr_accessor :update_embedded_object_position + + # The result of deleting a conditional format rule. + # Corresponds to the JSON property `deleteConditionalFormatRule` + # @return [Google::Apis::SheetsV4::DeleteConditionalFormatRuleResponse] + attr_accessor :delete_conditional_format_rule + + # The result of a filter view being duplicated. + # Corresponds to the JSON property `duplicateFilterView` + # @return [Google::Apis::SheetsV4::DuplicateFilterViewResponse] + attr_accessor :duplicate_filter_view + + # The result of adding a chart to a spreadsheet. + # Corresponds to the JSON property `addChart` + # @return [Google::Apis::SheetsV4::AddChartResponse] + attr_accessor :add_chart + + # The result of the find/replace. + # Corresponds to the JSON property `findReplace` + # @return [Google::Apis::SheetsV4::FindReplaceResponse] + attr_accessor :find_replace + + # The result of adding a sheet. + # Corresponds to the JSON property `addSheet` + # @return [Google::Apis::SheetsV4::AddSheetResponse] + attr_accessor :add_sheet + + # The result of updating a conditional format rule. + # Corresponds to the JSON property `updateConditionalFormatRule` + # @return [Google::Apis::SheetsV4::UpdateConditionalFormatRuleResponse] + attr_accessor :update_conditional_format_rule + + # The result of adding a named range. + # Corresponds to the JSON property `addNamedRange` + # @return [Google::Apis::SheetsV4::AddNamedRangeResponse] + attr_accessor :add_named_range + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @add_filter_view = args[:add_filter_view] if args.key?(:add_filter_view) + @add_banding = args[:add_banding] if args.key?(:add_banding) + @add_protected_range = args[:add_protected_range] if args.key?(:add_protected_range) + @duplicate_sheet = args[:duplicate_sheet] if args.key?(:duplicate_sheet) + @update_embedded_object_position = args[:update_embedded_object_position] if args.key?(:update_embedded_object_position) + @delete_conditional_format_rule = args[:delete_conditional_format_rule] if args.key?(:delete_conditional_format_rule) + @duplicate_filter_view = args[:duplicate_filter_view] if args.key?(:duplicate_filter_view) + @add_chart = args[:add_chart] if args.key?(:add_chart) + @find_replace = args[:find_replace] if args.key?(:find_replace) + @add_sheet = args[:add_sheet] if args.key?(:add_sheet) + @update_conditional_format_rule = args[:update_conditional_format_rule] if args.key?(:update_conditional_format_rule) + @add_named_range = args[:add_named_range] if args.key?(:add_named_range) + end + end + # Inserts cells into a range, shifting the existing cells over or down. class InsertRangeRequest include Google::Apis::Core::Hashable @@ -3172,86 +2805,24 @@ module Google end end - # The specifications of a chart. - class ChartSpec + # A chart embedded in a sheet. + class EmbeddedChart include Google::Apis::Core::Hashable - # Determines how the charts will use hidden rows or columns. - # Corresponds to the JSON property `hiddenDimensionStrategy` - # @return [String] - attr_accessor :hidden_dimension_strategy - - # The specification for a basic chart. See BasicChartType for the list - # of charts this supports. - # Corresponds to the JSON property `basicChart` - # @return [Google::Apis::SheetsV4::BasicChartSpec] - attr_accessor :basic_chart - - # The title of the chart. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # A pie chart. - # Corresponds to the JSON property `pieChart` - # @return [Google::Apis::SheetsV4::PieChartSpec] - attr_accessor :pie_chart - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @hidden_dimension_strategy = args[:hidden_dimension_strategy] if args.key?(:hidden_dimension_strategy) - @basic_chart = args[:basic_chart] if args.key?(:basic_chart) - @title = args[:title] if args.key?(:title) - @pie_chart = args[:pie_chart] if args.key?(:pie_chart) - end - end - - # A combination of a source range and how to extend that source. - class SourceAndDestination - include Google::Apis::Core::Hashable - - # A range on a sheet. - # All indexes are zero-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if `"Sheet1"` is sheet ID 0, then: - # `Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1` - # `Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1 == sheet_id:0` - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as `#REF!`. - # Corresponds to the JSON property `source` - # @return [Google::Apis::SheetsV4::GridRange] - attr_accessor :source - - # The number of rows or columns that data should be filled into. - # Positive numbers expand beyond the last row or last column - # of the source. Negative numbers expand before the first row - # or first column of the source. - # Corresponds to the JSON property `fillLength` + # The ID of the chart. + # Corresponds to the JSON property `chartId` # @return [Fixnum] - attr_accessor :fill_length + attr_accessor :chart_id - # The dimension that data should be filled into. - # Corresponds to the JSON property `dimension` - # @return [String] - attr_accessor :dimension + # The position of an embedded object such as a chart. + # Corresponds to the JSON property `position` + # @return [Google::Apis::SheetsV4::EmbeddedObjectPosition] + attr_accessor :position + + # The specifications of a chart. + # Corresponds to the JSON property `spec` + # @return [Google::Apis::SheetsV4::ChartSpec] + attr_accessor :spec def initialize(**args) update!(**args) @@ -3259,174 +2830,28 @@ module Google # Update properties of this object def update!(**args) - @source = args[:source] if args.key?(:source) - @fill_length = args[:fill_length] if args.key?(:fill_length) - @dimension = args[:dimension] if args.key?(:dimension) + @chart_id = args[:chart_id] if args.key?(:chart_id) + @position = args[:position] if args.key?(:position) + @spec = args[:spec] if args.key?(:spec) end end - # The value of the condition. - class ConditionValue + # A run of a text format. The format of this run continues until the start + # index of the next run. + # When updating, all fields must be set. + class TextFormatRun include Google::Apis::Core::Hashable - # A relative date (based on the current date). - # Valid only if the type is - # DATE_BEFORE, - # DATE_AFTER, - # DATE_ON_OR_BEFORE or - # DATE_ON_OR_AFTER. - # Relative dates are not supported in data validation. - # They are supported only in conditional formatting and - # conditional filters. - # Corresponds to the JSON property `relativeDate` - # @return [String] - attr_accessor :relative_date - - # A value the condition is based on. - # The value will be parsed as if the user typed into a cell. - # Formulas are supported (and must begin with an `=`). - # Corresponds to the JSON property `userEnteredValue` - # @return [String] - attr_accessor :user_entered_value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @relative_date = args[:relative_date] if args.key?(:relative_date) - @user_entered_value = args[:user_entered_value] if args.key?(:user_entered_value) - end - end - - # Inserts data into the spreadsheet starting at the specified coordinate. - class PasteDataRequest - include Google::Apis::Core::Hashable - - # The data to insert. - # Corresponds to the JSON property `data` - # @return [String] - attr_accessor :data - - # A coordinate in a sheet. - # All indexes are zero-based. - # Corresponds to the JSON property `coordinate` - # @return [Google::Apis::SheetsV4::GridCoordinate] - attr_accessor :coordinate - - # The delimiter in the data. - # Corresponds to the JSON property `delimiter` - # @return [String] - attr_accessor :delimiter - - # How the data should be pasted. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # True if the data is HTML. - # Corresponds to the JSON property `html` - # @return [Boolean] - attr_accessor :html - alias_method :html?, :html - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @data = args[:data] if args.key?(:data) - @coordinate = args[:coordinate] if args.key?(:coordinate) - @delimiter = args[:delimiter] if args.key?(:delimiter) - @type = args[:type] if args.key?(:type) - @html = args[:html] if args.key?(:html) - end - end - - # Finds and replaces data in cells over a range, sheet, or all sheets. - class FindReplaceRequest - include Google::Apis::Core::Hashable - - # The value to search. - # Corresponds to the JSON property `find` - # @return [String] - attr_accessor :find - - # The value to use as the replacement. - # Corresponds to the JSON property `replacement` - # @return [String] - attr_accessor :replacement - - # True if the find value is a regex. - # The regular expression and replacement should follow Java regex rules - # at https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html. - # The replacement string is allowed to refer to capturing groups. - # For example, if one cell has the contents `"Google Sheets"` and another - # has `"Google Docs"`, then searching for `"o.* (.*)"` with a replacement of - # `"$1 Rocks"` would change the contents of the cells to - # `"GSheets Rocks"` and `"GDocs Rocks"` respectively. - # Corresponds to the JSON property `searchByRegex` - # @return [Boolean] - attr_accessor :search_by_regex - alias_method :search_by_regex?, :search_by_regex - - # The sheet to find/replace over. - # Corresponds to the JSON property `sheetId` + # The character index where this run starts. + # Corresponds to the JSON property `startIndex` # @return [Fixnum] - attr_accessor :sheet_id + attr_accessor :start_index - # True to find/replace over all sheets. - # Corresponds to the JSON property `allSheets` - # @return [Boolean] - attr_accessor :all_sheets - alias_method :all_sheets?, :all_sheets - - # True if the search is case sensitive. - # Corresponds to the JSON property `matchCase` - # @return [Boolean] - attr_accessor :match_case - alias_method :match_case?, :match_case - - # True if the search should include cells with formulas. - # False to skip cells with formulas. - # Corresponds to the JSON property `includeFormulas` - # @return [Boolean] - attr_accessor :include_formulas - alias_method :include_formulas?, :include_formulas - - # A range on a sheet. - # All indexes are zero-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if `"Sheet1"` is sheet ID 0, then: - # `Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1` - # `Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1 == sheet_id:0` - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as `#REF!`. - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV4::GridRange] - attr_accessor :range - - # True if the find value should match the entire cell. - # Corresponds to the JSON property `matchEntireCell` - # @return [Boolean] - attr_accessor :match_entire_cell - alias_method :match_entire_cell?, :match_entire_cell + # The format of a run of text in a cell. + # Absent values indicate that the field isn't specified. + # Corresponds to the JSON property `format` + # @return [Google::Apis::SheetsV4::TextFormat] + attr_accessor :format def initialize(**args) update!(**args) @@ -3434,31 +2859,19 @@ module Google # Update properties of this object def update!(**args) - @find = args[:find] if args.key?(:find) - @replacement = args[:replacement] if args.key?(:replacement) - @search_by_regex = args[:search_by_regex] if args.key?(:search_by_regex) - @sheet_id = args[:sheet_id] if args.key?(:sheet_id) - @all_sheets = args[:all_sheets] if args.key?(:all_sheets) - @match_case = args[:match_case] if args.key?(:match_case) - @include_formulas = args[:include_formulas] if args.key?(:include_formulas) - @range = args[:range] if args.key?(:range) - @match_entire_cell = args[:match_entire_cell] if args.key?(:match_entire_cell) + @start_index = args[:start_index] if args.key?(:start_index) + @format = args[:format] if args.key?(:format) end end - # A sort order associated with a specific column or row. - class SortSpec + # The result of adding a named range. + class AddNamedRangeResponse include Google::Apis::Core::Hashable - # The order data should be sorted. - # Corresponds to the JSON property `sortOrder` - # @return [String] - attr_accessor :sort_order - - # The dimension the sort should be applied to. - # Corresponds to the JSON property `dimensionIndex` - # @return [Fixnum] - attr_accessor :dimension_index + # A named range. + # Corresponds to the JSON property `namedRange` + # @return [Google::Apis::SheetsV4::NamedRange] + attr_accessor :named_range def initialize(**args) update!(**args) @@ -3466,19 +2879,18 @@ module Google # Update properties of this object def update!(**args) - @sort_order = args[:sort_order] if args.key?(:sort_order) - @dimension_index = args[:dimension_index] if args.key?(:dimension_index) + @named_range = args[:named_range] if args.key?(:named_range) end end - # The request to copy a sheet across spreadsheets. - class CopySheetToAnotherSpreadsheetRequest + # Data about each cell in a row. + class RowData include Google::Apis::Core::Hashable - # The ID of the spreadsheet to copy the sheet to. - # Corresponds to the JSON property `destinationSpreadsheetId` - # @return [String] - attr_accessor :destination_spreadsheet_id + # The values in the row, one per column. + # Corresponds to the JSON property `values` + # @return [Array] + attr_accessor :values def initialize(**args) update!(**args) @@ -3486,170 +2898,7 @@ module Google # Update properties of this object def update!(**args) - @destination_spreadsheet_id = args[:destination_spreadsheet_id] if args.key?(:destination_spreadsheet_id) - end - end - - # The number format of a cell. - class NumberFormat - include Google::Apis::Core::Hashable - - # Pattern string used for formatting. If not set, a default pattern based on - # the user's locale will be used if necessary for the given type. - # See the [Date and Number Formats guide](/sheets/guides/formats) for more - # information about the supported patterns. - # Corresponds to the JSON property `pattern` - # @return [String] - attr_accessor :pattern - - # The type of the number format. - # When writing, this field must be set. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @pattern = args[:pattern] if args.key?(:pattern) - @type = args[:type] if args.key?(:type) - end - end - - # The request for clearing more than one range of values in a spreadsheet. - class BatchClearValuesRequest - include Google::Apis::Core::Hashable - - # The ranges to clear, in A1 notation. - # Corresponds to the JSON property `ranges` - # @return [Array] - attr_accessor :ranges - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @ranges = args[:ranges] if args.key?(:ranges) - end - end - - # Updates properties of dimensions within the specified range. - class UpdateDimensionPropertiesRequest - include Google::Apis::Core::Hashable - - # The fields that should be updated. At least one field must be specified. - # The root `properties` is implied and should not be specified. - # A single `"*"` can be used as short-hand for listing every field. - # Corresponds to the JSON property `fields` - # @return [String] - attr_accessor :fields - - # A range along a single dimension on a sheet. - # All indexes are zero-based. - # Indexes are half open: the start index is inclusive - # and the end index is exclusive. - # Missing indexes indicate the range is unbounded on that side. - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV4::DimensionRange] - attr_accessor :range - - # Properties about a dimension. - # Corresponds to the JSON property `properties` - # @return [Google::Apis::SheetsV4::DimensionProperties] - attr_accessor :properties - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @fields = args[:fields] if args.key?(:fields) - @range = args[:range] if args.key?(:range) - @properties = args[:properties] if args.key?(:properties) - end - end - - # The editors of a protected range. - class Editors - include Google::Apis::Core::Hashable - - # The email addresses of users with edit access to the protected range. - # Corresponds to the JSON property `users` - # @return [Array] - attr_accessor :users - - # The email addresses of groups with edit access to the protected range. - # Corresponds to the JSON property `groups` - # @return [Array] - attr_accessor :groups - - # True if anyone in the document's domain has edit access to the protected - # range. Domain protection is only supported on documents within a domain. - # Corresponds to the JSON property `domainUsersCanEdit` - # @return [Boolean] - attr_accessor :domain_users_can_edit - alias_method :domain_users_can_edit?, :domain_users_can_edit - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @users = args[:users] if args.key?(:users) - @groups = args[:groups] if args.key?(:groups) - @domain_users_can_edit = args[:domain_users_can_edit] if args.key?(:domain_users_can_edit) - end - end - - # Resource that represents a spreadsheet. - class Spreadsheet - include Google::Apis::Core::Hashable - - # The ID of the spreadsheet. - # This field is read-only. - # Corresponds to the JSON property `spreadsheetId` - # @return [String] - attr_accessor :spreadsheet_id - - # Properties of a spreadsheet. - # Corresponds to the JSON property `properties` - # @return [Google::Apis::SheetsV4::SpreadsheetProperties] - attr_accessor :properties - - # The url of the spreadsheet. - # This field is read-only. - # Corresponds to the JSON property `spreadsheetUrl` - # @return [String] - attr_accessor :spreadsheet_url - - # The sheets that are part of a spreadsheet. - # Corresponds to the JSON property `sheets` - # @return [Array] - attr_accessor :sheets - - # The named ranges defined in a spreadsheet. - # Corresponds to the JSON property `namedRanges` - # @return [Array] - attr_accessor :named_ranges - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) - @properties = args[:properties] if args.key?(:properties) - @spreadsheet_url = args[:spreadsheet_url] if args.key?(:spreadsheet_url) - @sheets = args[:sheets] if args.key?(:sheets) - @named_ranges = args[:named_ranges] if args.key?(:named_ranges) + @values = args[:values] if args.key?(:values) end end @@ -3657,12 +2906,6 @@ module Google class GridData include Google::Apis::Core::Hashable - # Metadata about the requested columns in the grid, starting with the column - # in start_column. - # Corresponds to the JSON property `columnMetadata` - # @return [Array] - attr_accessor :column_metadata - # The data in the grid, one entry per row, # starting with the row in startRow. # The values in RowData will correspond to columns starting @@ -3676,227 +2919,34 @@ module Google # @return [Fixnum] attr_accessor :start_row - # Metadata about the requested rows in the grid, starting with the row - # in start_row. - # Corresponds to the JSON property `rowMetadata` + # Metadata about the requested columns in the grid, starting with the column + # in start_column. + # Corresponds to the JSON property `columnMetadata` # @return [Array] - attr_accessor :row_metadata + attr_accessor :column_metadata # The first column this GridData refers to, zero-based. # Corresponds to the JSON property `startColumn` # @return [Fixnum] attr_accessor :start_column + # Metadata about the requested rows in the grid, starting with the row + # in start_row. + # Corresponds to the JSON property `rowMetadata` + # @return [Array] + attr_accessor :row_metadata + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @column_metadata = args[:column_metadata] if args.key?(:column_metadata) @row_data = args[:row_data] if args.key?(:row_data) @start_row = args[:start_row] if args.key?(:start_row) - @row_metadata = args[:row_metadata] if args.key?(:row_metadata) + @column_metadata = args[:column_metadata] if args.key?(:column_metadata) @start_column = args[:start_column] if args.key?(:start_column) - end - end - - # The definition of how a value in a pivot table should be calculated. - class PivotValue - include Google::Apis::Core::Hashable - - # A custom formula to calculate the value. The formula must start - # with an `=` character. - # Corresponds to the JSON property `formula` - # @return [String] - attr_accessor :formula - - # The column offset of the source range that this value reads from. - # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0` - # means this value refers to column `C`, whereas the offset `1` would - # refer to column `D`. - # Corresponds to the JSON property `sourceColumnOffset` - # @return [Fixnum] - attr_accessor :source_column_offset - - # A function to summarize the value. - # If formula is set, the only supported values are - # SUM and - # CUSTOM. - # If sourceColumnOffset is set, then `CUSTOM` - # is not supported. - # Corresponds to the JSON property `summarizeFunction` - # @return [String] - attr_accessor :summarize_function - - # A name to use for the value. This is only used if formula was set. - # Otherwise, the column name is used. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @formula = args[:formula] if args.key?(:formula) - @source_column_offset = args[:source_column_offset] if args.key?(:source_column_offset) - @summarize_function = args[:summarize_function] if args.key?(:summarize_function) - @name = args[:name] if args.key?(:name) - end - end - - # Removes the banded range with the given ID from the spreadsheet. - class DeleteBandingRequest - include Google::Apis::Core::Hashable - - # The ID of the banded range to delete. - # Corresponds to the JSON property `bandedRangeId` - # @return [Fixnum] - attr_accessor :banded_range_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @banded_range_id = args[:banded_range_id] if args.key?(:banded_range_id) - end - end - - # The default filter associated with a sheet. - class BasicFilter - include Google::Apis::Core::Hashable - - # The criteria for showing/hiding values per column. - # The map's key is the column index, and the value is the criteria for - # that column. - # Corresponds to the JSON property `criteria` - # @return [Hash] - attr_accessor :criteria - - # A range on a sheet. - # All indexes are zero-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if `"Sheet1"` is sheet ID 0, then: - # `Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1` - # `Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1 == sheet_id:0` - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as `#REF!`. - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV4::GridRange] - attr_accessor :range - - # The sort order per column. Later specifications are used when values - # are equal in the earlier specifications. - # Corresponds to the JSON property `sortSpecs` - # @return [Array] - attr_accessor :sort_specs - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @criteria = args[:criteria] if args.key?(:criteria) - @range = args[:range] if args.key?(:range) - @sort_specs = args[:sort_specs] if args.key?(:sort_specs) - end - end - - # Duplicates the contents of a sheet. - class DuplicateSheetRequest - include Google::Apis::Core::Hashable - - # The sheet to duplicate. - # Corresponds to the JSON property `sourceSheetId` - # @return [Fixnum] - attr_accessor :source_sheet_id - - # If set, the ID of the new sheet. If not set, an ID is chosen. - # If set, the ID must not conflict with any existing sheet ID. - # If set, it must be non-negative. - # Corresponds to the JSON property `newSheetId` - # @return [Fixnum] - attr_accessor :new_sheet_id - - # The zero-based index where the new sheet should be inserted. - # The index of all sheets after this are incremented. - # Corresponds to the JSON property `insertSheetIndex` - # @return [Fixnum] - attr_accessor :insert_sheet_index - - # The name of the new sheet. If empty, a new name is chosen for you. - # Corresponds to the JSON property `newSheetName` - # @return [String] - attr_accessor :new_sheet_name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @source_sheet_id = args[:source_sheet_id] if args.key?(:source_sheet_id) - @new_sheet_id = args[:new_sheet_id] if args.key?(:new_sheet_id) - @insert_sheet_index = args[:insert_sheet_index] if args.key?(:insert_sheet_index) - @new_sheet_name = args[:new_sheet_name] if args.key?(:new_sheet_name) - end - end - - # The result of adding a filter view. - class AddFilterViewResponse - include Google::Apis::Core::Hashable - - # A filter view. - # Corresponds to the JSON property `filter` - # @return [Google::Apis::SheetsV4::FilterView] - attr_accessor :filter - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @filter = args[:filter] if args.key?(:filter) - end - end - - # The result of duplicating a sheet. - class DuplicateSheetResponse - include Google::Apis::Core::Hashable - - # Properties of a sheet. - # Corresponds to the JSON property `properties` - # @return [Google::Apis::SheetsV4::SheetProperties] - attr_accessor :properties - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @properties = args[:properties] if args.key?(:properties) + @row_metadata = args[:row_metadata] if args.key?(:row_metadata) end end @@ -3904,17 +2954,6 @@ module Google class Border include Google::Apis::Core::Hashable - # The style of the border. - # Corresponds to the JSON property `style` - # @return [String] - attr_accessor :style - - # The width of the border, in pixels. - # Deprecated; the width is determined by the "style" field. - # Corresponds to the JSON property `width` - # @return [Fixnum] - attr_accessor :width - # Represents a color in the RGBA color space. This representation is designed # for simplicity of conversion to/from color representations in various # languages over compactness; for example, the fields of this representation @@ -4018,15 +3057,861 @@ module Google # @return [Google::Apis::SheetsV4::Color] attr_accessor :color + # The width of the border, in pixels. + # Deprecated; the width is determined by the "style" field. + # Corresponds to the JSON property `width` + # @return [Fixnum] + attr_accessor :width + + # The style of the border. + # Corresponds to the JSON property `style` + # @return [String] + attr_accessor :style + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @style = args[:style] if args.key?(:style) - @width = args[:width] if args.key?(:width) @color = args[:color] if args.key?(:color) + @width = args[:width] if args.key?(:width) + @style = args[:style] if args.key?(:style) + end + end + + # Updates properties of the named range with the specified + # namedRangeId. + class UpdateNamedRangeRequest + include Google::Apis::Core::Hashable + + # A named range. + # Corresponds to the JSON property `namedRange` + # @return [Google::Apis::SheetsV4::NamedRange] + attr_accessor :named_range + + # The fields that should be updated. At least one field must be specified. + # The root `namedRange` is implied and should not be specified. + # A single `"*"` can be used as short-hand for listing every field. + # Corresponds to the JSON property `fields` + # @return [String] + attr_accessor :fields + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @named_range = args[:named_range] if args.key?(:named_range) + @fields = args[:fields] if args.key?(:fields) + end + end + + # Finds and replaces data in cells over a range, sheet, or all sheets. + class FindReplaceRequest + include Google::Apis::Core::Hashable + + # True if the find value should match the entire cell. + # Corresponds to the JSON property `matchEntireCell` + # @return [Boolean] + attr_accessor :match_entire_cell + alias_method :match_entire_cell?, :match_entire_cell + + # True if the find value is a regex. + # The regular expression and replacement should follow Java regex rules + # at https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html. + # The replacement string is allowed to refer to capturing groups. + # For example, if one cell has the contents `"Google Sheets"` and another + # has `"Google Docs"`, then searching for `"o.* (.*)"` with a replacement of + # `"$1 Rocks"` would change the contents of the cells to + # `"GSheets Rocks"` and `"GDocs Rocks"` respectively. + # Corresponds to the JSON property `searchByRegex` + # @return [Boolean] + attr_accessor :search_by_regex + alias_method :search_by_regex?, :search_by_regex + + # The value to search. + # Corresponds to the JSON property `find` + # @return [String] + attr_accessor :find + + # The value to use as the replacement. + # Corresponds to the JSON property `replacement` + # @return [String] + attr_accessor :replacement + + # A range on a sheet. + # All indexes are zero-based. + # Indexes are half open, e.g the start index is inclusive + # and the end index is exclusive -- [start_index, end_index). + # Missing indexes indicate the range is unbounded on that side. + # For example, if `"Sheet1"` is sheet ID 0, then: + # `Sheet1!A1:A1 == sheet_id: 0, + # start_row_index: 0, end_row_index: 1, + # start_column_index: 0, end_column_index: 1` + # `Sheet1!A3:B4 == sheet_id: 0, + # start_row_index: 2, end_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A:B == sheet_id: 0, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A5:B == sheet_id: 0, + # start_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1 == sheet_id:0` + # The start index must always be less than or equal to the end index. + # If the start index equals the end index, then the range is empty. + # Empty ranges are typically not meaningful and are usually rendered in the + # UI as `#REF!`. + # Corresponds to the JSON property `range` + # @return [Google::Apis::SheetsV4::GridRange] + attr_accessor :range + + # The sheet to find/replace over. + # Corresponds to the JSON property `sheetId` + # @return [Fixnum] + attr_accessor :sheet_id + + # True to find/replace over all sheets. + # Corresponds to the JSON property `allSheets` + # @return [Boolean] + attr_accessor :all_sheets + alias_method :all_sheets?, :all_sheets + + # True if the search is case sensitive. + # Corresponds to the JSON property `matchCase` + # @return [Boolean] + attr_accessor :match_case + alias_method :match_case?, :match_case + + # True if the search should include cells with formulas. + # False to skip cells with formulas. + # Corresponds to the JSON property `includeFormulas` + # @return [Boolean] + attr_accessor :include_formulas + alias_method :include_formulas?, :include_formulas + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @match_entire_cell = args[:match_entire_cell] if args.key?(:match_entire_cell) + @search_by_regex = args[:search_by_regex] if args.key?(:search_by_regex) + @find = args[:find] if args.key?(:find) + @replacement = args[:replacement] if args.key?(:replacement) + @range = args[:range] if args.key?(:range) + @sheet_id = args[:sheet_id] if args.key?(:sheet_id) + @all_sheets = args[:all_sheets] if args.key?(:all_sheets) + @match_case = args[:match_case] if args.key?(:match_case) + @include_formulas = args[:include_formulas] if args.key?(:include_formulas) + end + end + + # Adds a new sheet. + # When a sheet is added at a given index, + # all subsequent sheets' indexes are incremented. + # To add an object sheet, use AddChartRequest instead and specify + # EmbeddedObjectPosition.sheetId or + # EmbeddedObjectPosition.newSheet. + class AddSheetRequest + include Google::Apis::Core::Hashable + + # Properties of a sheet. + # Corresponds to the JSON property `properties` + # @return [Google::Apis::SheetsV4::SheetProperties] + attr_accessor :properties + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @properties = args[:properties] if args.key?(:properties) + end + end + + # Updates all cells in a range with new data. + class UpdateCellsRequest + include Google::Apis::Core::Hashable + + # The data to write. + # Corresponds to the JSON property `rows` + # @return [Array] + attr_accessor :rows + + # The fields of CellData that should be updated. + # At least one field must be specified. + # The root is the CellData; 'row.values.' should not be specified. + # A single `"*"` can be used as short-hand for listing every field. + # Corresponds to the JSON property `fields` + # @return [String] + attr_accessor :fields + + # A coordinate in a sheet. + # All indexes are zero-based. + # Corresponds to the JSON property `start` + # @return [Google::Apis::SheetsV4::GridCoordinate] + attr_accessor :start + + # A range on a sheet. + # All indexes are zero-based. + # Indexes are half open, e.g the start index is inclusive + # and the end index is exclusive -- [start_index, end_index). + # Missing indexes indicate the range is unbounded on that side. + # For example, if `"Sheet1"` is sheet ID 0, then: + # `Sheet1!A1:A1 == sheet_id: 0, + # start_row_index: 0, end_row_index: 1, + # start_column_index: 0, end_column_index: 1` + # `Sheet1!A3:B4 == sheet_id: 0, + # start_row_index: 2, end_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A:B == sheet_id: 0, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A5:B == sheet_id: 0, + # start_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1 == sheet_id:0` + # The start index must always be less than or equal to the end index. + # If the start index equals the end index, then the range is empty. + # Empty ranges are typically not meaningful and are usually rendered in the + # UI as `#REF!`. + # Corresponds to the JSON property `range` + # @return [Google::Apis::SheetsV4::GridRange] + attr_accessor :range + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @rows = args[:rows] if args.key?(:rows) + @fields = args[:fields] if args.key?(:fields) + @start = args[:start] if args.key?(:start) + @range = args[:range] if args.key?(:range) + end + end + + # The result of deleting a conditional format rule. + class DeleteConditionalFormatRuleResponse + include Google::Apis::Core::Hashable + + # A rule describing a conditional format. + # Corresponds to the JSON property `rule` + # @return [Google::Apis::SheetsV4::ConditionalFormatRule] + attr_accessor :rule + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @rule = args[:rule] if args.key?(:rule) + end + end + + # Deletes a range of cells, shifting other cells into the deleted area. + class DeleteRangeRequest + include Google::Apis::Core::Hashable + + # The dimension from which deleted cells will be replaced with. + # If ROWS, existing cells will be shifted upward to + # replace the deleted cells. If COLUMNS, existing cells + # will be shifted left to replace the deleted cells. + # Corresponds to the JSON property `shiftDimension` + # @return [String] + attr_accessor :shift_dimension + + # A range on a sheet. + # All indexes are zero-based. + # Indexes are half open, e.g the start index is inclusive + # and the end index is exclusive -- [start_index, end_index). + # Missing indexes indicate the range is unbounded on that side. + # For example, if `"Sheet1"` is sheet ID 0, then: + # `Sheet1!A1:A1 == sheet_id: 0, + # start_row_index: 0, end_row_index: 1, + # start_column_index: 0, end_column_index: 1` + # `Sheet1!A3:B4 == sheet_id: 0, + # start_row_index: 2, end_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A:B == sheet_id: 0, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A5:B == sheet_id: 0, + # start_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1 == sheet_id:0` + # The start index must always be less than or equal to the end index. + # If the start index equals the end index, then the range is empty. + # Empty ranges are typically not meaningful and are usually rendered in the + # UI as `#REF!`. + # Corresponds to the JSON property `range` + # @return [Google::Apis::SheetsV4::GridRange] + attr_accessor :range + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @shift_dimension = args[:shift_dimension] if args.key?(:shift_dimension) + @range = args[:range] if args.key?(:range) + end + end + + # A coordinate in a sheet. + # All indexes are zero-based. + class GridCoordinate + include Google::Apis::Core::Hashable + + # The sheet this coordinate is on. + # Corresponds to the JSON property `sheetId` + # @return [Fixnum] + attr_accessor :sheet_id + + # The row index of the coordinate. + # Corresponds to the JSON property `rowIndex` + # @return [Fixnum] + attr_accessor :row_index + + # The column index of the coordinate. + # Corresponds to the JSON property `columnIndex` + # @return [Fixnum] + attr_accessor :column_index + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @sheet_id = args[:sheet_id] if args.key?(:sheet_id) + @row_index = args[:row_index] if args.key?(:row_index) + @column_index = args[:column_index] if args.key?(:column_index) + end + end + + # Updates properties of the sheet with the specified + # sheetId. + class UpdateSheetPropertiesRequest + include Google::Apis::Core::Hashable + + # The fields that should be updated. At least one field must be specified. + # The root `properties` is implied and should not be specified. + # A single `"*"` can be used as short-hand for listing every field. + # Corresponds to the JSON property `fields` + # @return [String] + attr_accessor :fields + + # Properties of a sheet. + # Corresponds to the JSON property `properties` + # @return [Google::Apis::SheetsV4::SheetProperties] + attr_accessor :properties + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @fields = args[:fields] if args.key?(:fields) + @properties = args[:properties] if args.key?(:properties) + end + end + + # Unmerges cells in the given range. + class UnmergeCellsRequest + include Google::Apis::Core::Hashable + + # A range on a sheet. + # All indexes are zero-based. + # Indexes are half open, e.g the start index is inclusive + # and the end index is exclusive -- [start_index, end_index). + # Missing indexes indicate the range is unbounded on that side. + # For example, if `"Sheet1"` is sheet ID 0, then: + # `Sheet1!A1:A1 == sheet_id: 0, + # start_row_index: 0, end_row_index: 1, + # start_column_index: 0, end_column_index: 1` + # `Sheet1!A3:B4 == sheet_id: 0, + # start_row_index: 2, end_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A:B == sheet_id: 0, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A5:B == sheet_id: 0, + # start_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1 == sheet_id:0` + # The start index must always be less than or equal to the end index. + # If the start index equals the end index, then the range is empty. + # Empty ranges are typically not meaningful and are usually rendered in the + # UI as `#REF!`. + # Corresponds to the JSON property `range` + # @return [Google::Apis::SheetsV4::GridRange] + attr_accessor :range + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @range = args[:range] if args.key?(:range) + end + end + + # Properties of a grid. + class GridProperties + include Google::Apis::Core::Hashable + + # The number of rows in the grid. + # Corresponds to the JSON property `rowCount` + # @return [Fixnum] + attr_accessor :row_count + + # The number of rows that are frozen in the grid. + # Corresponds to the JSON property `frozenRowCount` + # @return [Fixnum] + attr_accessor :frozen_row_count + + # True if the grid isn't showing gridlines in the UI. + # Corresponds to the JSON property `hideGridlines` + # @return [Boolean] + attr_accessor :hide_gridlines + alias_method :hide_gridlines?, :hide_gridlines + + # The number of columns in the grid. + # Corresponds to the JSON property `columnCount` + # @return [Fixnum] + attr_accessor :column_count + + # The number of columns that are frozen in the grid. + # Corresponds to the JSON property `frozenColumnCount` + # @return [Fixnum] + attr_accessor :frozen_column_count + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @row_count = args[:row_count] if args.key?(:row_count) + @frozen_row_count = args[:frozen_row_count] if args.key?(:frozen_row_count) + @hide_gridlines = args[:hide_gridlines] if args.key?(:hide_gridlines) + @column_count = args[:column_count] if args.key?(:column_count) + @frozen_column_count = args[:frozen_column_count] if args.key?(:frozen_column_count) + end + end + + # The result of updating an embedded object's position. + class UpdateEmbeddedObjectPositionResponse + include Google::Apis::Core::Hashable + + # The position of an embedded object such as a chart. + # Corresponds to the JSON property `position` + # @return [Google::Apis::SheetsV4::EmbeddedObjectPosition] + attr_accessor :position + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @position = args[:position] if args.key?(:position) + end + end + + # A sort order associated with a specific column or row. + class SortSpec + include Google::Apis::Core::Hashable + + # The order data should be sorted. + # Corresponds to the JSON property `sortOrder` + # @return [String] + attr_accessor :sort_order + + # The dimension the sort should be applied to. + # Corresponds to the JSON property `dimensionIndex` + # @return [Fixnum] + attr_accessor :dimension_index + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @sort_order = args[:sort_order] if args.key?(:sort_order) + @dimension_index = args[:dimension_index] if args.key?(:dimension_index) + end + end + + # A sheet in a spreadsheet. + class Sheet + include Google::Apis::Core::Hashable + + # Properties of a sheet. + # Corresponds to the JSON property `properties` + # @return [Google::Apis::SheetsV4::SheetProperties] + attr_accessor :properties + + # The specifications of every chart on this sheet. + # Corresponds to the JSON property `charts` + # @return [Array] + attr_accessor :charts + + # The filter views in this sheet. + # Corresponds to the JSON property `filterViews` + # @return [Array] + attr_accessor :filter_views + + # The conditional format rules in this sheet. + # Corresponds to the JSON property `conditionalFormats` + # @return [Array] + attr_accessor :conditional_formats + + # The protected ranges in this sheet. + # Corresponds to the JSON property `protectedRanges` + # @return [Array] + attr_accessor :protected_ranges + + # The default filter associated with a sheet. + # Corresponds to the JSON property `basicFilter` + # @return [Google::Apis::SheetsV4::BasicFilter] + attr_accessor :basic_filter + + # The ranges that are merged together. + # Corresponds to the JSON property `merges` + # @return [Array] + attr_accessor :merges + + # Data in the grid, if this is a grid sheet. + # The number of GridData objects returned is dependent on the number of + # ranges requested on this sheet. For example, if this is representing + # `Sheet1`, and the spreadsheet was requested with ranges + # `Sheet1!A1:C10` and `Sheet1!D15:E20`, then the first GridData will have a + # startRow/startColumn of `0`, + # while the second one will have `startRow 14` (zero-based row 15), + # and `startColumn 3` (zero-based column D). + # Corresponds to the JSON property `data` + # @return [Array] + attr_accessor :data + + # The banded (i.e. alternating colors) ranges on this sheet. + # Corresponds to the JSON property `bandedRanges` + # @return [Array] + attr_accessor :banded_ranges + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @properties = args[:properties] if args.key?(:properties) + @charts = args[:charts] if args.key?(:charts) + @filter_views = args[:filter_views] if args.key?(:filter_views) + @conditional_formats = args[:conditional_formats] if args.key?(:conditional_formats) + @protected_ranges = args[:protected_ranges] if args.key?(:protected_ranges) + @basic_filter = args[:basic_filter] if args.key?(:basic_filter) + @merges = args[:merges] if args.key?(:merges) + @data = args[:data] if args.key?(:data) + @banded_ranges = args[:banded_ranges] if args.key?(:banded_ranges) + end + end + + # A rule that may or may not match, depending on the condition. + class BooleanRule + include Google::Apis::Core::Hashable + + # A condition that can evaluate to true or false. + # BooleanConditions are used by conditional formatting, + # data validation, and the criteria in filters. + # Corresponds to the JSON property `condition` + # @return [Google::Apis::SheetsV4::BooleanCondition] + attr_accessor :condition + + # The format of a cell. + # Corresponds to the JSON property `format` + # @return [Google::Apis::SheetsV4::CellFormat] + attr_accessor :format + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @condition = args[:condition] if args.key?(:condition) + @format = args[:format] if args.key?(:format) + end + end + + # Criteria for showing/hiding rows in a filter or filter view. + class FilterCriteria + include Google::Apis::Core::Hashable + + # Values that should be hidden. + # Corresponds to the JSON property `hiddenValues` + # @return [Array] + attr_accessor :hidden_values + + # A condition that can evaluate to true or false. + # BooleanConditions are used by conditional formatting, + # data validation, and the criteria in filters. + # Corresponds to the JSON property `condition` + # @return [Google::Apis::SheetsV4::BooleanCondition] + attr_accessor :condition + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @hidden_values = args[:hidden_values] if args.key?(:hidden_values) + @condition = args[:condition] if args.key?(:condition) + end + end + + # Metadata about a value in a pivot grouping. + class PivotGroupValueMetadata + include Google::Apis::Core::Hashable + + # The kinds of value that a cell in a spreadsheet can have. + # Corresponds to the JSON property `value` + # @return [Google::Apis::SheetsV4::ExtendedValue] + attr_accessor :value + + # True if the data corresponding to the value is collapsed. + # Corresponds to the JSON property `collapsed` + # @return [Boolean] + attr_accessor :collapsed + alias_method :collapsed?, :collapsed + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @value = args[:value] if args.key?(:value) + @collapsed = args[:collapsed] if args.key?(:collapsed) + end + end + + # The editors of a protected range. + class Editors + include Google::Apis::Core::Hashable + + # The email addresses of users with edit access to the protected range. + # Corresponds to the JSON property `users` + # @return [Array] + attr_accessor :users + + # The email addresses of groups with edit access to the protected range. + # Corresponds to the JSON property `groups` + # @return [Array] + attr_accessor :groups + + # True if anyone in the document's domain has edit access to the protected + # range. Domain protection is only supported on documents within a domain. + # Corresponds to the JSON property `domainUsersCanEdit` + # @return [Boolean] + attr_accessor :domain_users_can_edit + alias_method :domain_users_can_edit?, :domain_users_can_edit + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @users = args[:users] if args.key?(:users) + @groups = args[:groups] if args.key?(:groups) + @domain_users_can_edit = args[:domain_users_can_edit] if args.key?(:domain_users_can_edit) + end + end + + # Updates a conditional format rule at the given index, + # or moves a conditional format rule to another index. + class UpdateConditionalFormatRuleRequest + include Google::Apis::Core::Hashable + + # A rule describing a conditional format. + # Corresponds to the JSON property `rule` + # @return [Google::Apis::SheetsV4::ConditionalFormatRule] + attr_accessor :rule + + # The zero-based index of the rule that should be replaced or moved. + # Corresponds to the JSON property `index` + # @return [Fixnum] + attr_accessor :index + + # The sheet of the rule to move. Required if new_index is set, + # unused otherwise. + # Corresponds to the JSON property `sheetId` + # @return [Fixnum] + attr_accessor :sheet_id + + # The zero-based new index the rule should end up at. + # Corresponds to the JSON property `newIndex` + # @return [Fixnum] + attr_accessor :new_index + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @rule = args[:rule] if args.key?(:rule) + @index = args[:index] if args.key?(:index) + @sheet_id = args[:sheet_id] if args.key?(:sheet_id) + @new_index = args[:new_index] if args.key?(:new_index) + end + end + + # A data validation rule. + class DataValidationRule + include Google::Apis::Core::Hashable + + # A condition that can evaluate to true or false. + # BooleanConditions are used by conditional formatting, + # data validation, and the criteria in filters. + # Corresponds to the JSON property `condition` + # @return [Google::Apis::SheetsV4::BooleanCondition] + attr_accessor :condition + + # True if the UI should be customized based on the kind of condition. + # If true, "List" conditions will show a dropdown. + # Corresponds to the JSON property `showCustomUi` + # @return [Boolean] + attr_accessor :show_custom_ui + alias_method :show_custom_ui?, :show_custom_ui + + # True if invalid data should be rejected. + # Corresponds to the JSON property `strict` + # @return [Boolean] + attr_accessor :strict + alias_method :strict?, :strict + + # A message to show the user when adding data to the cell. + # Corresponds to the JSON property `inputMessage` + # @return [String] + attr_accessor :input_message + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @condition = args[:condition] if args.key?(:condition) + @show_custom_ui = args[:show_custom_ui] if args.key?(:show_custom_ui) + @strict = args[:strict] if args.key?(:strict) + @input_message = args[:input_message] if args.key?(:input_message) + end + end + + # The domain of a chart. + # For example, if charting stock prices over time, this would be the date. + class BasicChartDomain + include Google::Apis::Core::Hashable + + # The data included in a domain or series. + # Corresponds to the JSON property `domain` + # @return [Google::Apis::SheetsV4::ChartData] + attr_accessor :domain + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @domain = args[:domain] if args.key?(:domain) + end + end + + # Inserts data into the spreadsheet starting at the specified coordinate. + class PasteDataRequest + include Google::Apis::Core::Hashable + + # True if the data is HTML. + # Corresponds to the JSON property `html` + # @return [Boolean] + attr_accessor :html + alias_method :html?, :html + + # A coordinate in a sheet. + # All indexes are zero-based. + # Corresponds to the JSON property `coordinate` + # @return [Google::Apis::SheetsV4::GridCoordinate] + attr_accessor :coordinate + + # The data to insert. + # Corresponds to the JSON property `data` + # @return [String] + attr_accessor :data + + # The delimiter in the data. + # Corresponds to the JSON property `delimiter` + # @return [String] + attr_accessor :delimiter + + # How the data should be pasted. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @html = args[:html] if args.key?(:html) + @coordinate = args[:coordinate] if args.key?(:coordinate) + @data = args[:data] if args.key?(:data) + @delimiter = args[:delimiter] if args.key?(:delimiter) + @type = args[:type] if args.key?(:type) + end + end + + # Appends rows or columns to the end of a sheet. + class AppendDimensionRequest + include Google::Apis::Core::Hashable + + # The sheet to append rows or columns to. + # Corresponds to the JSON property `sheetId` + # @return [Fixnum] + attr_accessor :sheet_id + + # Whether rows or columns should be appended. + # Corresponds to the JSON property `dimension` + # @return [String] + attr_accessor :dimension + + # The number of rows or columns to append. + # Corresponds to the JSON property `length` + # @return [Fixnum] + attr_accessor :length + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @sheet_id = args[:sheet_id] if args.key?(:sheet_id) + @dimension = args[:dimension] if args.key?(:dimension) + @length = args[:length] if args.key?(:length) end end @@ -4049,62 +3934,99 @@ module Google end end - # The result of adding a chart to a spreadsheet. - class AddChartResponse + # Update an embedded object's position (such as a moving or resizing a + # chart or image). + class UpdateEmbeddedObjectPositionRequest include Google::Apis::Core::Hashable - # A chart embedded in a sheet. - # Corresponds to the JSON property `chart` - # @return [Google::Apis::SheetsV4::EmbeddedChart] - attr_accessor :chart + # The position of an embedded object such as a chart. + # Corresponds to the JSON property `newPosition` + # @return [Google::Apis::SheetsV4::EmbeddedObjectPosition] + attr_accessor :new_position - def initialize(**args) - update!(**args) - end + # The fields of OverlayPosition + # that should be updated when setting a new position. Used only if + # newPosition.overlayPosition + # is set, in which case at least one field must + # be specified. The root `newPosition.overlayPosition` is implied and + # should not be specified. + # A single `"*"` can be used as short-hand for listing every field. + # Corresponds to the JSON property `fields` + # @return [String] + attr_accessor :fields - # Update properties of this object - def update!(**args) - @chart = args[:chart] if args.key?(:chart) - end - end - - # Adds a new banded range to the spreadsheet. - class AddBandingRequest - include Google::Apis::Core::Hashable - - # A banded (alternating colors) range in a sheet. - # Corresponds to the JSON property `bandedRange` - # @return [Google::Apis::SheetsV4::BandedRange] - attr_accessor :banded_range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @banded_range = args[:banded_range] if args.key?(:banded_range) - end - end - - # Adds new cells after the last row with data in a sheet, - # inserting new rows into the sheet if necessary. - class AppendCellsRequest - include Google::Apis::Core::Hashable - - # The sheet ID to append the data to. - # Corresponds to the JSON property `sheetId` + # The ID of the object to moved. + # Corresponds to the JSON property `objectId` # @return [Fixnum] - attr_accessor :sheet_id + attr_accessor :object_id_prop - # The data to append. - # Corresponds to the JSON property `rows` - # @return [Array] - attr_accessor :rows + def initialize(**args) + update!(**args) + end - # The fields of CellData that should be updated. - # At least one field must be specified. - # The root is the CellData; 'row.values.' should not be specified. + # Update properties of this object + def update!(**args) + @new_position = args[:new_position] if args.key?(:new_position) + @fields = args[:fields] if args.key?(:fields) + @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) + end + end + + # A pie chart. + class PieChartSpec + include Google::Apis::Core::Hashable + + # Where the legend of the pie chart should be drawn. + # Corresponds to the JSON property `legendPosition` + # @return [String] + attr_accessor :legend_position + + # The size of the hole in the pie chart. + # Corresponds to the JSON property `pieHole` + # @return [Float] + attr_accessor :pie_hole + + # The data included in a domain or series. + # Corresponds to the JSON property `domain` + # @return [Google::Apis::SheetsV4::ChartData] + attr_accessor :domain + + # True if the pie is three dimensional. + # Corresponds to the JSON property `threeDimensional` + # @return [Boolean] + attr_accessor :three_dimensional + alias_method :three_dimensional?, :three_dimensional + + # The data included in a domain or series. + # Corresponds to the JSON property `series` + # @return [Google::Apis::SheetsV4::ChartData] + attr_accessor :series + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @legend_position = args[:legend_position] if args.key?(:legend_position) + @pie_hole = args[:pie_hole] if args.key?(:pie_hole) + @domain = args[:domain] if args.key?(:domain) + @three_dimensional = args[:three_dimensional] if args.key?(:three_dimensional) + @series = args[:series] if args.key?(:series) + end + end + + # Updates properties of the filter view. + class UpdateFilterViewRequest + include Google::Apis::Core::Hashable + + # A filter view. + # Corresponds to the JSON property `filter` + # @return [Google::Apis::SheetsV4::FilterView] + attr_accessor :filter + + # The fields that should be updated. At least one field must be specified. + # The root `filter` is implied and should not be specified. # A single `"*"` can be used as short-hand for listing every field. # Corresponds to the JSON property `fields` # @return [String] @@ -4116,19 +4038,485 @@ module Google # Update properties of this object def update!(**args) - @sheet_id = args[:sheet_id] if args.key?(:sheet_id) - @rows = args[:rows] if args.key?(:rows) + @filter = args[:filter] if args.key?(:filter) @fields = args[:fields] if args.key?(:fields) end end - # Data about each cell in a row. - class RowData + # A rule describing a conditional format. + class ConditionalFormatRule include Google::Apis::Core::Hashable - # The values in the row, one per column. + # The ranges that will be formatted if the condition is true. + # All the ranges must be on the same grid. + # Corresponds to the JSON property `ranges` + # @return [Array] + attr_accessor :ranges + + # A rule that applies a gradient color scale format, based on + # the interpolation points listed. The format of a cell will vary + # based on its contents as compared to the values of the interpolation + # points. + # Corresponds to the JSON property `gradientRule` + # @return [Google::Apis::SheetsV4::GradientRule] + attr_accessor :gradient_rule + + # A rule that may or may not match, depending on the condition. + # Corresponds to the JSON property `booleanRule` + # @return [Google::Apis::SheetsV4::BooleanRule] + attr_accessor :boolean_rule + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @ranges = args[:ranges] if args.key?(:ranges) + @gradient_rule = args[:gradient_rule] if args.key?(:gradient_rule) + @boolean_rule = args[:boolean_rule] if args.key?(:boolean_rule) + end + end + + # Copies data from the source to the destination. + class CopyPasteRequest + include Google::Apis::Core::Hashable + + # A range on a sheet. + # All indexes are zero-based. + # Indexes are half open, e.g the start index is inclusive + # and the end index is exclusive -- [start_index, end_index). + # Missing indexes indicate the range is unbounded on that side. + # For example, if `"Sheet1"` is sheet ID 0, then: + # `Sheet1!A1:A1 == sheet_id: 0, + # start_row_index: 0, end_row_index: 1, + # start_column_index: 0, end_column_index: 1` + # `Sheet1!A3:B4 == sheet_id: 0, + # start_row_index: 2, end_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A:B == sheet_id: 0, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A5:B == sheet_id: 0, + # start_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1 == sheet_id:0` + # The start index must always be less than or equal to the end index. + # If the start index equals the end index, then the range is empty. + # Empty ranges are typically not meaningful and are usually rendered in the + # UI as `#REF!`. + # Corresponds to the JSON property `source` + # @return [Google::Apis::SheetsV4::GridRange] + attr_accessor :source + + # What kind of data to paste. + # Corresponds to the JSON property `pasteType` + # @return [String] + attr_accessor :paste_type + + # A range on a sheet. + # All indexes are zero-based. + # Indexes are half open, e.g the start index is inclusive + # and the end index is exclusive -- [start_index, end_index). + # Missing indexes indicate the range is unbounded on that side. + # For example, if `"Sheet1"` is sheet ID 0, then: + # `Sheet1!A1:A1 == sheet_id: 0, + # start_row_index: 0, end_row_index: 1, + # start_column_index: 0, end_column_index: 1` + # `Sheet1!A3:B4 == sheet_id: 0, + # start_row_index: 2, end_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A:B == sheet_id: 0, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A5:B == sheet_id: 0, + # start_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1 == sheet_id:0` + # The start index must always be less than or equal to the end index. + # If the start index equals the end index, then the range is empty. + # Empty ranges are typically not meaningful and are usually rendered in the + # UI as `#REF!`. + # Corresponds to the JSON property `destination` + # @return [Google::Apis::SheetsV4::GridRange] + attr_accessor :destination + + # How that data should be oriented when pasting. + # Corresponds to the JSON property `pasteOrientation` + # @return [String] + attr_accessor :paste_orientation + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @source = args[:source] if args.key?(:source) + @paste_type = args[:paste_type] if args.key?(:paste_type) + @destination = args[:destination] if args.key?(:destination) + @paste_orientation = args[:paste_orientation] if args.key?(:paste_orientation) + end + end + + # A single kind of update to apply to a spreadsheet. + class Request + include Google::Apis::Core::Hashable + + # Adds a new conditional format rule at the given index. + # All subsequent rules' indexes are incremented. + # Corresponds to the JSON property `addConditionalFormatRule` + # @return [Google::Apis::SheetsV4::AddConditionalFormatRuleRequest] + attr_accessor :add_conditional_format_rule + + # Adds a named range to the spreadsheet. + # Corresponds to the JSON property `addNamedRange` + # @return [Google::Apis::SheetsV4::AddNamedRangeRequest] + attr_accessor :add_named_range + + # Updates all cells in a range with new data. + # Corresponds to the JSON property `updateCells` + # @return [Google::Apis::SheetsV4::UpdateCellsRequest] + attr_accessor :update_cells + + # Updates properties of a spreadsheet. + # Corresponds to the JSON property `updateSpreadsheetProperties` + # @return [Google::Apis::SheetsV4::UpdateSpreadsheetPropertiesRequest] + attr_accessor :update_spreadsheet_properties + + # Deletes the embedded object with the given ID. + # Corresponds to the JSON property `deleteEmbeddedObject` + # @return [Google::Apis::SheetsV4::DeleteEmbeddedObjectRequest] + attr_accessor :delete_embedded_object + + # Updates properties of the filter view. + # Corresponds to the JSON property `updateFilterView` + # @return [Google::Apis::SheetsV4::UpdateFilterViewRequest] + attr_accessor :update_filter_view + + # Adds a new banded range to the spreadsheet. + # Corresponds to the JSON property `addBanding` + # @return [Google::Apis::SheetsV4::AddBandingRequest] + attr_accessor :add_banding + + # Adds new cells after the last row with data in a sheet, + # inserting new rows into the sheet if necessary. + # Corresponds to the JSON property `appendCells` + # @return [Google::Apis::SheetsV4::AppendCellsRequest] + attr_accessor :append_cells + + # Automatically resizes one or more dimensions based on the contents + # of the cells in that dimension. + # Corresponds to the JSON property `autoResizeDimensions` + # @return [Google::Apis::SheetsV4::AutoResizeDimensionsRequest] + attr_accessor :auto_resize_dimensions + + # Moves data from the source to the destination. + # Corresponds to the JSON property `cutPaste` + # @return [Google::Apis::SheetsV4::CutPasteRequest] + attr_accessor :cut_paste + + # Merges all cells in the range. + # Corresponds to the JSON property `mergeCells` + # @return [Google::Apis::SheetsV4::MergeCellsRequest] + attr_accessor :merge_cells + + # Updates properties of the named range with the specified + # namedRangeId. + # Corresponds to the JSON property `updateNamedRange` + # @return [Google::Apis::SheetsV4::UpdateNamedRangeRequest] + attr_accessor :update_named_range + + # Updates properties of the sheet with the specified + # sheetId. + # Corresponds to the JSON property `updateSheetProperties` + # @return [Google::Apis::SheetsV4::UpdateSheetPropertiesRequest] + attr_accessor :update_sheet_properties + + # Deletes the dimensions from the sheet. + # Corresponds to the JSON property `deleteDimension` + # @return [Google::Apis::SheetsV4::DeleteDimensionRequest] + attr_accessor :delete_dimension + + # Fills in more data based on existing data. + # Corresponds to the JSON property `autoFill` + # @return [Google::Apis::SheetsV4::AutoFillRequest] + attr_accessor :auto_fill + + # Sorts data in rows based on a sort order per column. + # Corresponds to the JSON property `sortRange` + # @return [Google::Apis::SheetsV4::SortRangeRequest] + attr_accessor :sort_range + + # Deletes the protected range with the given ID. + # Corresponds to the JSON property `deleteProtectedRange` + # @return [Google::Apis::SheetsV4::DeleteProtectedRangeRequest] + attr_accessor :delete_protected_range + + # Duplicates a particular filter view. + # Corresponds to the JSON property `duplicateFilterView` + # @return [Google::Apis::SheetsV4::DuplicateFilterViewRequest] + attr_accessor :duplicate_filter_view + + # Adds a chart to a sheet in the spreadsheet. + # Corresponds to the JSON property `addChart` + # @return [Google::Apis::SheetsV4::AddChartRequest] + attr_accessor :add_chart + + # Finds and replaces data in cells over a range, sheet, or all sheets. + # Corresponds to the JSON property `findReplace` + # @return [Google::Apis::SheetsV4::FindReplaceRequest] + attr_accessor :find_replace + + # Splits a column of text into multiple columns, + # based on a delimiter in each cell. + # Corresponds to the JSON property `textToColumns` + # @return [Google::Apis::SheetsV4::TextToColumnsRequest] + attr_accessor :text_to_columns + + # Updates a chart's specifications. + # (This does not move or resize a chart. To move or resize a chart, use + # UpdateEmbeddedObjectPositionRequest.) + # Corresponds to the JSON property `updateChartSpec` + # @return [Google::Apis::SheetsV4::UpdateChartSpecRequest] + attr_accessor :update_chart_spec + + # Adds a new sheet. + # When a sheet is added at a given index, + # all subsequent sheets' indexes are incremented. + # To add an object sheet, use AddChartRequest instead and specify + # EmbeddedObjectPosition.sheetId or + # EmbeddedObjectPosition.newSheet. + # Corresponds to the JSON property `addSheet` + # @return [Google::Apis::SheetsV4::AddSheetRequest] + attr_accessor :add_sheet + + # Updates an existing protected range with the specified + # protectedRangeId. + # Corresponds to the JSON property `updateProtectedRange` + # @return [Google::Apis::SheetsV4::UpdateProtectedRangeRequest] + attr_accessor :update_protected_range + + # Deletes a particular filter view. + # Corresponds to the JSON property `deleteFilterView` + # @return [Google::Apis::SheetsV4::DeleteFilterViewRequest] + attr_accessor :delete_filter_view + + # Copies data from the source to the destination. + # Corresponds to the JSON property `copyPaste` + # @return [Google::Apis::SheetsV4::CopyPasteRequest] + attr_accessor :copy_paste + + # Inserts rows or columns in a sheet at a particular index. + # Corresponds to the JSON property `insertDimension` + # @return [Google::Apis::SheetsV4::InsertDimensionRequest] + attr_accessor :insert_dimension + + # Deletes a range of cells, shifting other cells into the deleted area. + # Corresponds to the JSON property `deleteRange` + # @return [Google::Apis::SheetsV4::DeleteRangeRequest] + attr_accessor :delete_range + + # Removes the banded range with the given ID from the spreadsheet. + # Corresponds to the JSON property `deleteBanding` + # @return [Google::Apis::SheetsV4::DeleteBandingRequest] + attr_accessor :delete_banding + + # Adds a filter view. + # Corresponds to the JSON property `addFilterView` + # @return [Google::Apis::SheetsV4::AddFilterViewRequest] + attr_accessor :add_filter_view + + # Sets a data validation rule to every cell in the range. + # To clear validation in a range, call this with no rule specified. + # Corresponds to the JSON property `setDataValidation` + # @return [Google::Apis::SheetsV4::SetDataValidationRequest] + attr_accessor :set_data_validation + + # Updates the borders of a range. + # If a field is not set in the request, that means the border remains as-is. + # For example, with two subsequent UpdateBordersRequest: + # 1. range: A1:A5 `` top: RED, bottom: WHITE `` + # 2. range: A1:A5 `` left: BLUE `` + # That would result in A1:A5 having a borders of + # `` top: RED, bottom: WHITE, left: BLUE ``. + # If you want to clear a border, explicitly set the style to + # NONE. + # Corresponds to the JSON property `updateBorders` + # @return [Google::Apis::SheetsV4::UpdateBordersRequest] + attr_accessor :update_borders + + # Deletes a conditional format rule at the given index. + # All subsequent rules' indexes are decremented. + # Corresponds to the JSON property `deleteConditionalFormatRule` + # @return [Google::Apis::SheetsV4::DeleteConditionalFormatRuleRequest] + attr_accessor :delete_conditional_format_rule + + # Updates all cells in the range to the values in the given Cell object. + # Only the fields listed in the fields field are updated; others are + # unchanged. + # If writing a cell with a formula, the formula's ranges will automatically + # increment for each field in the range. + # For example, if writing a cell with formula `=A1` into range B2:C4, + # B2 would be `=A1`, B3 would be `=A2`, B4 would be `=A3`, + # C2 would be `=B1`, C3 would be `=B2`, C4 would be `=B3`. + # To keep the formula's ranges static, use the `$` indicator. + # For example, use the formula `=$A$1` to prevent both the row and the + # column from incrementing. + # Corresponds to the JSON property `repeatCell` + # @return [Google::Apis::SheetsV4::RepeatCellRequest] + attr_accessor :repeat_cell + + # Clears the basic filter, if any exists on the sheet. + # Corresponds to the JSON property `clearBasicFilter` + # @return [Google::Apis::SheetsV4::ClearBasicFilterRequest] + attr_accessor :clear_basic_filter + + # Appends rows or columns to the end of a sheet. + # Corresponds to the JSON property `appendDimension` + # @return [Google::Apis::SheetsV4::AppendDimensionRequest] + attr_accessor :append_dimension + + # Updates a conditional format rule at the given index, + # or moves a conditional format rule to another index. + # Corresponds to the JSON property `updateConditionalFormatRule` + # @return [Google::Apis::SheetsV4::UpdateConditionalFormatRuleRequest] + attr_accessor :update_conditional_format_rule + + # Inserts cells into a range, shifting the existing cells over or down. + # Corresponds to the JSON property `insertRange` + # @return [Google::Apis::SheetsV4::InsertRangeRequest] + attr_accessor :insert_range + + # Moves one or more rows or columns. + # Corresponds to the JSON property `moveDimension` + # @return [Google::Apis::SheetsV4::MoveDimensionRequest] + attr_accessor :move_dimension + + # Updates properties of the supplied banded range. + # Corresponds to the JSON property `updateBanding` + # @return [Google::Apis::SheetsV4::UpdateBandingRequest] + attr_accessor :update_banding + + # Removes the named range with the given ID from the spreadsheet. + # Corresponds to the JSON property `deleteNamedRange` + # @return [Google::Apis::SheetsV4::DeleteNamedRangeRequest] + attr_accessor :delete_named_range + + # Adds a new protected range. + # Corresponds to the JSON property `addProtectedRange` + # @return [Google::Apis::SheetsV4::AddProtectedRangeRequest] + attr_accessor :add_protected_range + + # Duplicates the contents of a sheet. + # Corresponds to the JSON property `duplicateSheet` + # @return [Google::Apis::SheetsV4::DuplicateSheetRequest] + attr_accessor :duplicate_sheet + + # Deletes the requested sheet. + # Corresponds to the JSON property `deleteSheet` + # @return [Google::Apis::SheetsV4::DeleteSheetRequest] + attr_accessor :delete_sheet + + # Unmerges cells in the given range. + # Corresponds to the JSON property `unmergeCells` + # @return [Google::Apis::SheetsV4::UnmergeCellsRequest] + attr_accessor :unmerge_cells + + # Update an embedded object's position (such as a moving or resizing a + # chart or image). + # Corresponds to the JSON property `updateEmbeddedObjectPosition` + # @return [Google::Apis::SheetsV4::UpdateEmbeddedObjectPositionRequest] + attr_accessor :update_embedded_object_position + + # Updates properties of dimensions within the specified range. + # Corresponds to the JSON property `updateDimensionProperties` + # @return [Google::Apis::SheetsV4::UpdateDimensionPropertiesRequest] + attr_accessor :update_dimension_properties + + # Inserts data into the spreadsheet starting at the specified coordinate. + # Corresponds to the JSON property `pasteData` + # @return [Google::Apis::SheetsV4::PasteDataRequest] + attr_accessor :paste_data + + # Sets the basic filter associated with a sheet. + # Corresponds to the JSON property `setBasicFilter` + # @return [Google::Apis::SheetsV4::SetBasicFilterRequest] + attr_accessor :set_basic_filter + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @add_conditional_format_rule = args[:add_conditional_format_rule] if args.key?(:add_conditional_format_rule) + @add_named_range = args[:add_named_range] if args.key?(:add_named_range) + @update_cells = args[:update_cells] if args.key?(:update_cells) + @update_spreadsheet_properties = args[:update_spreadsheet_properties] if args.key?(:update_spreadsheet_properties) + @delete_embedded_object = args[:delete_embedded_object] if args.key?(:delete_embedded_object) + @update_filter_view = args[:update_filter_view] if args.key?(:update_filter_view) + @add_banding = args[:add_banding] if args.key?(:add_banding) + @append_cells = args[:append_cells] if args.key?(:append_cells) + @auto_resize_dimensions = args[:auto_resize_dimensions] if args.key?(:auto_resize_dimensions) + @cut_paste = args[:cut_paste] if args.key?(:cut_paste) + @merge_cells = args[:merge_cells] if args.key?(:merge_cells) + @update_named_range = args[:update_named_range] if args.key?(:update_named_range) + @update_sheet_properties = args[:update_sheet_properties] if args.key?(:update_sheet_properties) + @delete_dimension = args[:delete_dimension] if args.key?(:delete_dimension) + @auto_fill = args[:auto_fill] if args.key?(:auto_fill) + @sort_range = args[:sort_range] if args.key?(:sort_range) + @delete_protected_range = args[:delete_protected_range] if args.key?(:delete_protected_range) + @duplicate_filter_view = args[:duplicate_filter_view] if args.key?(:duplicate_filter_view) + @add_chart = args[:add_chart] if args.key?(:add_chart) + @find_replace = args[:find_replace] if args.key?(:find_replace) + @text_to_columns = args[:text_to_columns] if args.key?(:text_to_columns) + @update_chart_spec = args[:update_chart_spec] if args.key?(:update_chart_spec) + @add_sheet = args[:add_sheet] if args.key?(:add_sheet) + @update_protected_range = args[:update_protected_range] if args.key?(:update_protected_range) + @delete_filter_view = args[:delete_filter_view] if args.key?(:delete_filter_view) + @copy_paste = args[:copy_paste] if args.key?(:copy_paste) + @insert_dimension = args[:insert_dimension] if args.key?(:insert_dimension) + @delete_range = args[:delete_range] if args.key?(:delete_range) + @delete_banding = args[:delete_banding] if args.key?(:delete_banding) + @add_filter_view = args[:add_filter_view] if args.key?(:add_filter_view) + @set_data_validation = args[:set_data_validation] if args.key?(:set_data_validation) + @update_borders = args[:update_borders] if args.key?(:update_borders) + @delete_conditional_format_rule = args[:delete_conditional_format_rule] if args.key?(:delete_conditional_format_rule) + @repeat_cell = args[:repeat_cell] if args.key?(:repeat_cell) + @clear_basic_filter = args[:clear_basic_filter] if args.key?(:clear_basic_filter) + @append_dimension = args[:append_dimension] if args.key?(:append_dimension) + @update_conditional_format_rule = args[:update_conditional_format_rule] if args.key?(:update_conditional_format_rule) + @insert_range = args[:insert_range] if args.key?(:insert_range) + @move_dimension = args[:move_dimension] if args.key?(:move_dimension) + @update_banding = args[:update_banding] if args.key?(:update_banding) + @delete_named_range = args[:delete_named_range] if args.key?(:delete_named_range) + @add_protected_range = args[:add_protected_range] if args.key?(:add_protected_range) + @duplicate_sheet = args[:duplicate_sheet] if args.key?(:duplicate_sheet) + @delete_sheet = args[:delete_sheet] if args.key?(:delete_sheet) + @unmerge_cells = args[:unmerge_cells] if args.key?(:unmerge_cells) + @update_embedded_object_position = args[:update_embedded_object_position] if args.key?(:update_embedded_object_position) + @update_dimension_properties = args[:update_dimension_properties] if args.key?(:update_dimension_properties) + @paste_data = args[:paste_data] if args.key?(:paste_data) + @set_basic_filter = args[:set_basic_filter] if args.key?(:set_basic_filter) + end + end + + # A condition that can evaluate to true or false. + # BooleanConditions are used by conditional formatting, + # data validation, and the criteria in filters. + class BooleanCondition + include Google::Apis::Core::Hashable + + # The type of condition. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # The values of the condition. The number of supported values depends + # on the condition type. Some support zero values, + # others one or two values, + # and ConditionType.ONE_OF_LIST supports an arbitrary number of values. # Corresponds to the JSON property `values` - # @return [Array] + # @return [Array] attr_accessor :values def initialize(**args) @@ -4137,41 +4525,60 @@ module Google # Update properties of this object def update!(**args) + @type = args[:type] if args.key?(:type) @values = args[:values] if args.key?(:values) end end - # A single series of data in a chart. - # For example, if charting stock prices over time, multiple series may exist, - # one for the "Open Price", "High Price", "Low Price" and "Close Price". - class BasicChartSeries + # A range on a sheet. + # All indexes are zero-based. + # Indexes are half open, e.g the start index is inclusive + # and the end index is exclusive -- [start_index, end_index). + # Missing indexes indicate the range is unbounded on that side. + # For example, if `"Sheet1"` is sheet ID 0, then: + # `Sheet1!A1:A1 == sheet_id: 0, + # start_row_index: 0, end_row_index: 1, + # start_column_index: 0, end_column_index: 1` + # `Sheet1!A3:B4 == sheet_id: 0, + # start_row_index: 2, end_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A:B == sheet_id: 0, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A5:B == sheet_id: 0, + # start_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1 == sheet_id:0` + # The start index must always be less than or equal to the end index. + # If the start index equals the end index, then the range is empty. + # Empty ranges are typically not meaningful and are usually rendered in the + # UI as `#REF!`. + class GridRange include Google::Apis::Core::Hashable - # The data included in a domain or series. - # Corresponds to the JSON property `series` - # @return [Google::Apis::SheetsV4::ChartData] - attr_accessor :series + # The end row (exclusive) of the range, or not set if unbounded. + # Corresponds to the JSON property `endRowIndex` + # @return [Fixnum] + attr_accessor :end_row_index - # The minor axis that will specify the range of values for this series. - # For example, if charting stocks over time, the "Volume" series - # may want to be pinned to the right with the prices pinned to the left, - # because the scale of trading volume is different than the scale of - # prices. - # It is an error to specify an axis that isn't a valid minor axis - # for the chart's type. - # Corresponds to the JSON property `targetAxis` - # @return [String] - attr_accessor :target_axis + # The end column (exclusive) of the range, or not set if unbounded. + # Corresponds to the JSON property `endColumnIndex` + # @return [Fixnum] + attr_accessor :end_column_index - # The type of this series. Valid only if the - # chartType is - # COMBO. - # Different types will change the way the series is visualized. - # Only LINE, AREA, - # and COLUMN are supported. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type + # The start row (inclusive) of the range, or not set if unbounded. + # Corresponds to the JSON property `startRowIndex` + # @return [Fixnum] + attr_accessor :start_row_index + + # The start column (inclusive) of the range, or not set if unbounded. + # Corresponds to the JSON property `startColumnIndex` + # @return [Fixnum] + attr_accessor :start_column_index + + # The sheet this range is on. + # Corresponds to the JSON property `sheetId` + # @return [Fixnum] + attr_accessor :sheet_id def initialize(**args) update!(**args) @@ -4179,125 +4586,11 @@ module Google # Update properties of this object def update!(**args) - @series = args[:series] if args.key?(:series) - @target_axis = args[:target_axis] if args.key?(:target_axis) - @type = args[:type] if args.key?(:type) - end - end - - # A named range. - class NamedRange - include Google::Apis::Core::Hashable - - # The ID of the named range. - # Corresponds to the JSON property `namedRangeId` - # @return [String] - attr_accessor :named_range_id - - # A range on a sheet. - # All indexes are zero-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if `"Sheet1"` is sheet ID 0, then: - # `Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1` - # `Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1 == sheet_id:0` - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as `#REF!`. - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV4::GridRange] - attr_accessor :range - - # The name of the named range. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @named_range_id = args[:named_range_id] if args.key?(:named_range_id) - @range = args[:range] if args.key?(:range) - @name = args[:name] if args.key?(:name) - end - end - - # Updates all cells in the range to the values in the given Cell object. - # Only the fields listed in the fields field are updated; others are - # unchanged. - # If writing a cell with a formula, the formula's ranges will automatically - # increment for each field in the range. - # For example, if writing a cell with formula `=A1` into range B2:C4, - # B2 would be `=A1`, B3 would be `=A2`, B4 would be `=A3`, - # C2 would be `=B1`, C3 would be `=B2`, C4 would be `=B3`. - # To keep the formula's ranges static, use the `$` indicator. - # For example, use the formula `=$A$1` to prevent both the row and the - # column from incrementing. - class RepeatCellRequest - include Google::Apis::Core::Hashable - - # Data about a specific cell. - # Corresponds to the JSON property `cell` - # @return [Google::Apis::SheetsV4::CellData] - attr_accessor :cell - - # The fields that should be updated. At least one field must be specified. - # The root `cell` is implied and should not be specified. - # A single `"*"` can be used as short-hand for listing every field. - # Corresponds to the JSON property `fields` - # @return [String] - attr_accessor :fields - - # A range on a sheet. - # All indexes are zero-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if `"Sheet1"` is sheet ID 0, then: - # `Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1` - # `Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1 == sheet_id:0` - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as `#REF!`. - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV4::GridRange] - attr_accessor :range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @cell = args[:cell] if args.key?(:cell) - @fields = args[:fields] if args.key?(:fields) - @range = args[:range] if args.key?(:range) + @end_row_index = args[:end_row_index] if args.key?(:end_row_index) + @end_column_index = args[:end_column_index] if args.key?(:end_column_index) + @start_row_index = args[:start_row_index] if args.key?(:start_row_index) + @start_column_index = args[:start_column_index] if args.key?(:start_column_index) + @sheet_id = args[:sheet_id] if args.key?(:sheet_id) end end @@ -4306,11 +4599,6 @@ module Google class BasicChartSpec include Google::Apis::Core::Hashable - # The type of the chart. - # Corresponds to the JSON property `chartType` - # @return [String] - attr_accessor :chart_type - # The domain of data this is charting. # Only a single domain is currently supported. # Corresponds to the JSON property `domains` @@ -4326,6 +4614,16 @@ module Google # @return [Fixnum] attr_accessor :header_count + # The axis on the chart. + # Corresponds to the JSON property `axis` + # @return [Array] + attr_accessor :axis + + # The type of the chart. + # Corresponds to the JSON property `chartType` + # @return [String] + attr_accessor :chart_type + # The data this chart is visualizing. # Corresponds to the JSON property `series` # @return [Array] @@ -4336,51 +4634,131 @@ module Google # @return [String] attr_accessor :legend_position - # The axis on the chart. - # Corresponds to the JSON property `axis` - # @return [Array] - attr_accessor :axis - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @chart_type = args[:chart_type] if args.key?(:chart_type) @domains = args[:domains] if args.key?(:domains) @header_count = args[:header_count] if args.key?(:header_count) + @axis = args[:axis] if args.key?(:axis) + @chart_type = args[:chart_type] if args.key?(:chart_type) @series = args[:series] if args.key?(:series) @legend_position = args[:legend_position] if args.key?(:legend_position) - @axis = args[:axis] if args.key?(:axis) end end - # Update an embedded object's position (such as a moving or resizing a - # chart or image). - class UpdateEmbeddedObjectPositionRequest + # Sets a data validation rule to every cell in the range. + # To clear validation in a range, call this with no rule specified. + class SetDataValidationRequest include Google::Apis::Core::Hashable - # The position of an embedded object such as a chart. - # Corresponds to the JSON property `newPosition` - # @return [Google::Apis::SheetsV4::EmbeddedObjectPosition] - attr_accessor :new_position + # A data validation rule. + # Corresponds to the JSON property `rule` + # @return [Google::Apis::SheetsV4::DataValidationRule] + attr_accessor :rule - # The ID of the object to moved. - # Corresponds to the JSON property `objectId` - # @return [Fixnum] - attr_accessor :object_id_prop + # A range on a sheet. + # All indexes are zero-based. + # Indexes are half open, e.g the start index is inclusive + # and the end index is exclusive -- [start_index, end_index). + # Missing indexes indicate the range is unbounded on that side. + # For example, if `"Sheet1"` is sheet ID 0, then: + # `Sheet1!A1:A1 == sheet_id: 0, + # start_row_index: 0, end_row_index: 1, + # start_column_index: 0, end_column_index: 1` + # `Sheet1!A3:B4 == sheet_id: 0, + # start_row_index: 2, end_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A:B == sheet_id: 0, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A5:B == sheet_id: 0, + # start_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1 == sheet_id:0` + # The start index must always be less than or equal to the end index. + # If the start index equals the end index, then the range is empty. + # Empty ranges are typically not meaningful and are usually rendered in the + # UI as `#REF!`. + # Corresponds to the JSON property `range` + # @return [Google::Apis::SheetsV4::GridRange] + attr_accessor :range - # The fields of OverlayPosition - # that should be updated when setting a new position. Used only if - # newPosition.overlayPosition - # is set, in which case at least one field must - # be specified. The root `newPosition.overlayPosition` is implied and - # should not be specified. - # A single `"*"` can be used as short-hand for listing every field. - # Corresponds to the JSON property `fields` + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @rule = args[:rule] if args.key?(:rule) + @range = args[:range] if args.key?(:range) + end + end + + # Data about a specific cell. + class CellData + include Google::Apis::Core::Hashable + + # The kinds of value that a cell in a spreadsheet can have. + # Corresponds to the JSON property `effectiveValue` + # @return [Google::Apis::SheetsV4::ExtendedValue] + attr_accessor :effective_value + + # Runs of rich text applied to subsections of the cell. Runs are only valid + # on user entered strings, not formulas, bools, or numbers. + # Runs start at specific indexes in the text and continue until the next + # run. Properties of a run will continue unless explicitly changed + # in a subsequent run (and properties of the first run will continue + # the properties of the cell unless explicitly changed). + # When writing, the new runs will overwrite any prior runs. When writing a + # new user_entered_value, previous runs will be erased. + # Corresponds to the JSON property `textFormatRuns` + # @return [Array] + attr_accessor :text_format_runs + + # The formatted value of the cell. + # This is the value as it's shown to the user. + # This field is read-only. + # Corresponds to the JSON property `formattedValue` # @return [String] - attr_accessor :fields + attr_accessor :formatted_value + + # A hyperlink this cell points to, if any. + # This field is read-only. (To set it, use a `=HYPERLINK` formula.) + # Corresponds to the JSON property `hyperlink` + # @return [String] + attr_accessor :hyperlink + + # A pivot table. + # Corresponds to the JSON property `pivotTable` + # @return [Google::Apis::SheetsV4::PivotTable] + attr_accessor :pivot_table + + # The format of a cell. + # Corresponds to the JSON property `userEnteredFormat` + # @return [Google::Apis::SheetsV4::CellFormat] + attr_accessor :user_entered_format + + # The format of a cell. + # Corresponds to the JSON property `effectiveFormat` + # @return [Google::Apis::SheetsV4::CellFormat] + attr_accessor :effective_format + + # Any note on the cell. + # Corresponds to the JSON property `note` + # @return [String] + attr_accessor :note + + # The kinds of value that a cell in a spreadsheet can have. + # Corresponds to the JSON property `userEnteredValue` + # @return [Google::Apis::SheetsV4::ExtendedValue] + attr_accessor :user_entered_value + + # A data validation rule. + # Corresponds to the JSON property `dataValidation` + # @return [Google::Apis::SheetsV4::DataValidationRule] + attr_accessor :data_validation def initialize(**args) update!(**args) @@ -4388,20 +4766,48 @@ module Google # Update properties of this object def update!(**args) - @new_position = args[:new_position] if args.key?(:new_position) - @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) - @fields = args[:fields] if args.key?(:fields) + @effective_value = args[:effective_value] if args.key?(:effective_value) + @text_format_runs = args[:text_format_runs] if args.key?(:text_format_runs) + @formatted_value = args[:formatted_value] if args.key?(:formatted_value) + @hyperlink = args[:hyperlink] if args.key?(:hyperlink) + @pivot_table = args[:pivot_table] if args.key?(:pivot_table) + @user_entered_format = args[:user_entered_format] if args.key?(:user_entered_format) + @effective_format = args[:effective_format] if args.key?(:effective_format) + @note = args[:note] if args.key?(:note) + @user_entered_value = args[:user_entered_value] if args.key?(:user_entered_value) + @data_validation = args[:data_validation] if args.key?(:data_validation) end end - # Sets the basic filter associated with a sheet. - class SetBasicFilterRequest + # The request for updating any aspect of a spreadsheet. + class BatchUpdateSpreadsheetRequest include Google::Apis::Core::Hashable - # The default filter associated with a sheet. - # Corresponds to the JSON property `filter` - # @return [Google::Apis::SheetsV4::BasicFilter] - attr_accessor :filter + # Determines if the update response should include the spreadsheet + # resource. + # Corresponds to the JSON property `includeSpreadsheetInResponse` + # @return [Boolean] + attr_accessor :include_spreadsheet_in_response + alias_method :include_spreadsheet_in_response?, :include_spreadsheet_in_response + + # Limits the ranges included in the response spreadsheet. + # Meaningful only if include_spreadsheet_response is 'true'. + # Corresponds to the JSON property `responseRanges` + # @return [Array] + attr_accessor :response_ranges + + # True if grid data should be returned. Meaningful only if + # if include_spreadsheet_response is 'true'. + # This parameter is ignored if a field mask was set in the request. + # Corresponds to the JSON property `responseIncludeGridData` + # @return [Boolean] + attr_accessor :response_include_grid_data + alias_method :response_include_grid_data?, :response_include_grid_data + + # A list of updates to apply to the spreadsheet. + # Corresponds to the JSON property `requests` + # @return [Array] + attr_accessor :requests def initialize(**args) update!(**args) @@ -4409,13 +4815,88 @@ module Google # Update properties of this object def update!(**args) - @filter = args[:filter] if args.key?(:filter) + @include_spreadsheet_in_response = args[:include_spreadsheet_in_response] if args.key?(:include_spreadsheet_in_response) + @response_ranges = args[:response_ranges] if args.key?(:response_ranges) + @response_include_grid_data = args[:response_include_grid_data] if args.key?(:response_include_grid_data) + @requests = args[:requests] if args.key?(:requests) end end - # Automatically resizes one or more dimensions based on the contents - # of the cells in that dimension. - class AutoResizeDimensionsRequest + # An axis of the chart. + # A chart may not have more than one axis per + # axis position. + class BasicChartAxis + include Google::Apis::Core::Hashable + + # The format of a run of text in a cell. + # Absent values indicate that the field isn't specified. + # Corresponds to the JSON property `format` + # @return [Google::Apis::SheetsV4::TextFormat] + attr_accessor :format + + # The position of this axis. + # Corresponds to the JSON property `position` + # @return [String] + attr_accessor :position + + # The title of this axis. If set, this overrides any title inferred + # from headers of the data. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @format = args[:format] if args.key?(:format) + @position = args[:position] if args.key?(:position) + @title = args[:title] if args.key?(:title) + end + end + + # The amount of padding around the cell, in pixels. + # When updating padding, every field must be specified. + class Padding + include Google::Apis::Core::Hashable + + # The bottom padding of the cell. + # Corresponds to the JSON property `bottom` + # @return [Fixnum] + attr_accessor :bottom + + # The top padding of the cell. + # Corresponds to the JSON property `top` + # @return [Fixnum] + attr_accessor :top + + # The left padding of the cell. + # Corresponds to the JSON property `left` + # @return [Fixnum] + attr_accessor :left + + # The right padding of the cell. + # Corresponds to the JSON property `right` + # @return [Fixnum] + attr_accessor :right + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @bottom = args[:bottom] if args.key?(:bottom) + @top = args[:top] if args.key?(:top) + @left = args[:left] if args.key?(:left) + @right = args[:right] if args.key?(:right) + end + end + + # Deletes the dimensions from the sheet. + class DeleteDimensionRequest include Google::Apis::Core::Hashable # A range along a single dimension on a sheet. @@ -4423,9 +4904,9 @@ module Google # Indexes are half open: the start index is inclusive # and the end index is exclusive. # Missing indexes indicate the range is unbounded on that side. - # Corresponds to the JSON property `dimensions` + # Corresponds to the JSON property `range` # @return [Google::Apis::SheetsV4::DimensionRange] - attr_accessor :dimensions + attr_accessor :range def initialize(**args) update!(**args) @@ -4433,7 +4914,236 @@ module Google # Update properties of this object def update!(**args) - @dimensions = args[:dimensions] if args.key?(:dimensions) + @range = args[:range] if args.key?(:range) + end + end + + # Updates a chart's specifications. + # (This does not move or resize a chart. To move or resize a chart, use + # UpdateEmbeddedObjectPositionRequest.) + class UpdateChartSpecRequest + include Google::Apis::Core::Hashable + + # The specifications of a chart. + # Corresponds to the JSON property `spec` + # @return [Google::Apis::SheetsV4::ChartSpec] + attr_accessor :spec + + # The ID of the chart to update. + # Corresponds to the JSON property `chartId` + # @return [Fixnum] + attr_accessor :chart_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @spec = args[:spec] if args.key?(:spec) + @chart_id = args[:chart_id] if args.key?(:chart_id) + end + end + + # Deletes a particular filter view. + class DeleteFilterViewRequest + include Google::Apis::Core::Hashable + + # The ID of the filter to delete. + # Corresponds to the JSON property `filterId` + # @return [Fixnum] + attr_accessor :filter_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @filter_id = args[:filter_id] if args.key?(:filter_id) + end + end + + # The response when updating a range of values in a spreadsheet. + class BatchUpdateValuesResponse + include Google::Apis::Core::Hashable + + # The total number of columns where at least one cell in the column was + # updated. + # Corresponds to the JSON property `totalUpdatedColumns` + # @return [Fixnum] + attr_accessor :total_updated_columns + + # The spreadsheet the updates were applied to. + # Corresponds to the JSON property `spreadsheetId` + # @return [String] + attr_accessor :spreadsheet_id + + # The total number of rows where at least one cell in the row was updated. + # Corresponds to the JSON property `totalUpdatedRows` + # @return [Fixnum] + attr_accessor :total_updated_rows + + # One UpdateValuesResponse per requested range, in the same order as + # the requests appeared. + # Corresponds to the JSON property `responses` + # @return [Array] + attr_accessor :responses + + # The total number of sheets where at least one cell in the sheet was + # updated. + # Corresponds to the JSON property `totalUpdatedSheets` + # @return [Fixnum] + attr_accessor :total_updated_sheets + + # The total number of cells updated. + # Corresponds to the JSON property `totalUpdatedCells` + # @return [Fixnum] + attr_accessor :total_updated_cells + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @total_updated_columns = args[:total_updated_columns] if args.key?(:total_updated_columns) + @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) + @total_updated_rows = args[:total_updated_rows] if args.key?(:total_updated_rows) + @responses = args[:responses] if args.key?(:responses) + @total_updated_sheets = args[:total_updated_sheets] if args.key?(:total_updated_sheets) + @total_updated_cells = args[:total_updated_cells] if args.key?(:total_updated_cells) + end + end + + # Sorts data in rows based on a sort order per column. + class SortRangeRequest + include Google::Apis::Core::Hashable + + # The sort order per column. Later specifications are used when values + # are equal in the earlier specifications. + # Corresponds to the JSON property `sortSpecs` + # @return [Array] + attr_accessor :sort_specs + + # A range on a sheet. + # All indexes are zero-based. + # Indexes are half open, e.g the start index is inclusive + # and the end index is exclusive -- [start_index, end_index). + # Missing indexes indicate the range is unbounded on that side. + # For example, if `"Sheet1"` is sheet ID 0, then: + # `Sheet1!A1:A1 == sheet_id: 0, + # start_row_index: 0, end_row_index: 1, + # start_column_index: 0, end_column_index: 1` + # `Sheet1!A3:B4 == sheet_id: 0, + # start_row_index: 2, end_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A:B == sheet_id: 0, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A5:B == sheet_id: 0, + # start_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1 == sheet_id:0` + # The start index must always be less than or equal to the end index. + # If the start index equals the end index, then the range is empty. + # Empty ranges are typically not meaningful and are usually rendered in the + # UI as `#REF!`. + # Corresponds to the JSON property `range` + # @return [Google::Apis::SheetsV4::GridRange] + attr_accessor :range + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @sort_specs = args[:sort_specs] if args.key?(:sort_specs) + @range = args[:range] if args.key?(:range) + end + end + + # Merges all cells in the range. + class MergeCellsRequest + include Google::Apis::Core::Hashable + + # A range on a sheet. + # All indexes are zero-based. + # Indexes are half open, e.g the start index is inclusive + # and the end index is exclusive -- [start_index, end_index). + # Missing indexes indicate the range is unbounded on that side. + # For example, if `"Sheet1"` is sheet ID 0, then: + # `Sheet1!A1:A1 == sheet_id: 0, + # start_row_index: 0, end_row_index: 1, + # start_column_index: 0, end_column_index: 1` + # `Sheet1!A3:B4 == sheet_id: 0, + # start_row_index: 2, end_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A:B == sheet_id: 0, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A5:B == sheet_id: 0, + # start_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1 == sheet_id:0` + # The start index must always be less than or equal to the end index. + # If the start index equals the end index, then the range is empty. + # Empty ranges are typically not meaningful and are usually rendered in the + # UI as `#REF!`. + # Corresponds to the JSON property `range` + # @return [Google::Apis::SheetsV4::GridRange] + attr_accessor :range + + # How the cells should be merged. + # Corresponds to the JSON property `mergeType` + # @return [String] + attr_accessor :merge_type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @range = args[:range] if args.key?(:range) + @merge_type = args[:merge_type] if args.key?(:merge_type) + end + end + + # Adds a new protected range. + class AddProtectedRangeRequest + include Google::Apis::Core::Hashable + + # A protected range. + # Corresponds to the JSON property `protectedRange` + # @return [Google::Apis::SheetsV4::ProtectedRange] + attr_accessor :protected_range + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @protected_range = args[:protected_range] if args.key?(:protected_range) + end + end + + # The request for clearing more than one range of values in a spreadsheet. + class BatchClearValuesRequest + include Google::Apis::Core::Hashable + + # The ranges to clear, in A1 notation. + # Corresponds to the JSON property `ranges` + # @return [Array] + attr_accessor :ranges + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @ranges = args[:ranges] if args.key?(:ranges) end end @@ -4456,6 +5166,691 @@ module Google end end + # The result of duplicating a sheet. + class DuplicateSheetResponse + include Google::Apis::Core::Hashable + + # Properties of a sheet. + # Corresponds to the JSON property `properties` + # @return [Google::Apis::SheetsV4::SheetProperties] + attr_accessor :properties + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @properties = args[:properties] if args.key?(:properties) + end + end + + # Splits a column of text into multiple columns, + # based on a delimiter in each cell. + class TextToColumnsRequest + include Google::Apis::Core::Hashable + + # The delimiter to use. Used only if delimiterType is + # CUSTOM. + # Corresponds to the JSON property `delimiter` + # @return [String] + attr_accessor :delimiter + + # A range on a sheet. + # All indexes are zero-based. + # Indexes are half open, e.g the start index is inclusive + # and the end index is exclusive -- [start_index, end_index). + # Missing indexes indicate the range is unbounded on that side. + # For example, if `"Sheet1"` is sheet ID 0, then: + # `Sheet1!A1:A1 == sheet_id: 0, + # start_row_index: 0, end_row_index: 1, + # start_column_index: 0, end_column_index: 1` + # `Sheet1!A3:B4 == sheet_id: 0, + # start_row_index: 2, end_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A:B == sheet_id: 0, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A5:B == sheet_id: 0, + # start_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1 == sheet_id:0` + # The start index must always be less than or equal to the end index. + # If the start index equals the end index, then the range is empty. + # Empty ranges are typically not meaningful and are usually rendered in the + # UI as `#REF!`. + # Corresponds to the JSON property `source` + # @return [Google::Apis::SheetsV4::GridRange] + attr_accessor :source + + # The delimiter type to use. + # Corresponds to the JSON property `delimiterType` + # @return [String] + attr_accessor :delimiter_type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @delimiter = args[:delimiter] if args.key?(:delimiter) + @source = args[:source] if args.key?(:source) + @delimiter_type = args[:delimiter_type] if args.key?(:delimiter_type) + end + end + + # Clears the basic filter, if any exists on the sheet. + class ClearBasicFilterRequest + include Google::Apis::Core::Hashable + + # The sheet ID on which the basic filter should be cleared. + # Corresponds to the JSON property `sheetId` + # @return [Fixnum] + attr_accessor :sheet_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @sheet_id = args[:sheet_id] if args.key?(:sheet_id) + end + end + + # The reply for batch updating a spreadsheet. + class BatchUpdateSpreadsheetResponse + include Google::Apis::Core::Hashable + + # The reply of the updates. This maps 1:1 with the updates, although + # replies to some requests may be empty. + # Corresponds to the JSON property `replies` + # @return [Array] + attr_accessor :replies + + # Resource that represents a spreadsheet. + # Corresponds to the JSON property `updatedSpreadsheet` + # @return [Google::Apis::SheetsV4::Spreadsheet] + attr_accessor :updated_spreadsheet + + # The spreadsheet the updates were applied to. + # Corresponds to the JSON property `spreadsheetId` + # @return [String] + attr_accessor :spreadsheet_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @replies = args[:replies] if args.key?(:replies) + @updated_spreadsheet = args[:updated_spreadsheet] if args.key?(:updated_spreadsheet) + @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) + end + end + + # Removes the banded range with the given ID from the spreadsheet. + class DeleteBandingRequest + include Google::Apis::Core::Hashable + + # The ID of the banded range to delete. + # Corresponds to the JSON property `bandedRangeId` + # @return [Fixnum] + attr_accessor :banded_range_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @banded_range_id = args[:banded_range_id] if args.key?(:banded_range_id) + end + end + + # The response when updating a range of values in a spreadsheet. + class AppendValuesResponse + include Google::Apis::Core::Hashable + + # The response when updating a range of values in a spreadsheet. + # Corresponds to the JSON property `updates` + # @return [Google::Apis::SheetsV4::UpdateValuesResponse] + attr_accessor :updates + + # The range (in A1 notation) of the table that values are being appended to + # (before the values were appended). + # Empty if no table was found. + # Corresponds to the JSON property `tableRange` + # @return [String] + attr_accessor :table_range + + # The spreadsheet the updates were applied to. + # Corresponds to the JSON property `spreadsheetId` + # @return [String] + attr_accessor :spreadsheet_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @updates = args[:updates] if args.key?(:updates) + @table_range = args[:table_range] if args.key?(:table_range) + @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) + end + end + + # Moves one or more rows or columns. + class MoveDimensionRequest + include Google::Apis::Core::Hashable + + # The zero-based start index of where to move the source data to, + # based on the coordinates *before* the source data is removed + # from the grid. Existing data will be shifted down or right + # (depending on the dimension) to make room for the moved dimensions. + # The source dimensions are removed from the grid, so the + # the data may end up in a different index than specified. + # For example, given `A1..A5` of `0, 1, 2, 3, 4` and wanting to move + # `"1"` and `"2"` to between `"3"` and `"4"`, the source would be + # `ROWS [1..3)`,and the destination index would be `"4"` + # (the zero-based index of row 5). + # The end result would be `A1..A5` of `0, 3, 1, 2, 4`. + # Corresponds to the JSON property `destinationIndex` + # @return [Fixnum] + attr_accessor :destination_index + + # A range along a single dimension on a sheet. + # All indexes are zero-based. + # Indexes are half open: the start index is inclusive + # and the end index is exclusive. + # Missing indexes indicate the range is unbounded on that side. + # Corresponds to the JSON property `source` + # @return [Google::Apis::SheetsV4::DimensionRange] + attr_accessor :source + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @destination_index = args[:destination_index] if args.key?(:destination_index) + @source = args[:source] if args.key?(:source) + end + end + + # Criteria for showing/hiding rows in a pivot table. + class PivotFilterCriteria + include Google::Apis::Core::Hashable + + # Values that should be included. Values not listed here are excluded. + # Corresponds to the JSON property `visibleValues` + # @return [Array] + attr_accessor :visible_values + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @visible_values = args[:visible_values] if args.key?(:visible_values) + end + end + + # Adds a filter view. + class AddFilterViewRequest + include Google::Apis::Core::Hashable + + # A filter view. + # Corresponds to the JSON property `filter` + # @return [Google::Apis::SheetsV4::FilterView] + attr_accessor :filter + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @filter = args[:filter] if args.key?(:filter) + end + end + + # Adds a new conditional format rule at the given index. + # All subsequent rules' indexes are incremented. + class AddConditionalFormatRuleRequest + include Google::Apis::Core::Hashable + + # A rule describing a conditional format. + # Corresponds to the JSON property `rule` + # @return [Google::Apis::SheetsV4::ConditionalFormatRule] + attr_accessor :rule + + # The zero-based index where the rule should be inserted. + # Corresponds to the JSON property `index` + # @return [Fixnum] + attr_accessor :index + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @rule = args[:rule] if args.key?(:rule) + @index = args[:index] if args.key?(:index) + end + end + + # The specifications of a chart. + class ChartSpec + include Google::Apis::Core::Hashable + + # A pie chart. + # Corresponds to the JSON property `pieChart` + # @return [Google::Apis::SheetsV4::PieChartSpec] + attr_accessor :pie_chart + + # The specification for a basic chart. See BasicChartType for the list + # of charts this supports. + # Corresponds to the JSON property `basicChart` + # @return [Google::Apis::SheetsV4::BasicChartSpec] + attr_accessor :basic_chart + + # Determines how the charts will use hidden rows or columns. + # Corresponds to the JSON property `hiddenDimensionStrategy` + # @return [String] + attr_accessor :hidden_dimension_strategy + + # The title of the chart. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @pie_chart = args[:pie_chart] if args.key?(:pie_chart) + @basic_chart = args[:basic_chart] if args.key?(:basic_chart) + @hidden_dimension_strategy = args[:hidden_dimension_strategy] if args.key?(:hidden_dimension_strategy) + @title = args[:title] if args.key?(:title) + end + end + + # The number format of a cell. + class NumberFormat + include Google::Apis::Core::Hashable + + # Pattern string used for formatting. If not set, a default pattern based on + # the user's locale will be used if necessary for the given type. + # See the [Date and Number Formats guide](/sheets/guides/formats) for more + # information about the supported patterns. + # Corresponds to the JSON property `pattern` + # @return [String] + attr_accessor :pattern + + # The type of the number format. + # When writing, this field must be set. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @pattern = args[:pattern] if args.key?(:pattern) + @type = args[:type] if args.key?(:type) + end + end + + # Properties of a sheet. + class SheetProperties + include Google::Apis::Core::Hashable + + # The name of the sheet. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + # Represents a color in the RGBA color space. This representation is designed + # for simplicity of conversion to/from color representations in various + # languages over compactness; for example, the fields of this representation + # can be trivially provided to the constructor of "java.awt.Color" in Java; it + # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" + # method in iOS; and, with just a little work, it can be easily formatted into + # a CSS "rgba()" string in JavaScript, as well. Here are some examples: + # Example (Java): + # import com.google.type.Color; + # // ... + # public static java.awt.Color fromProto(Color protocolor) ` + # float alpha = protocolor.hasAlpha() + # ? protocolor.getAlpha().getValue() + # : 1.0; + # return new java.awt.Color( + # protocolor.getRed(), + # protocolor.getGreen(), + # protocolor.getBlue(), + # alpha); + # ` + # public static Color toProto(java.awt.Color color) ` + # float red = (float) color.getRed(); + # float green = (float) color.getGreen(); + # float blue = (float) color.getBlue(); + # float denominator = 255.0; + # Color.Builder resultBuilder = + # Color + # .newBuilder() + # .setRed(red / denominator) + # .setGreen(green / denominator) + # .setBlue(blue / denominator); + # int alpha = color.getAlpha(); + # if (alpha != 255) ` + # result.setAlpha( + # FloatValue + # .newBuilder() + # .setValue(((float) alpha) / denominator) + # .build()); + # ` + # return resultBuilder.build(); + # ` + # // ... + # Example (iOS / Obj-C): + # // ... + # static UIColor* fromProto(Color* protocolor) ` + # float red = [protocolor red]; + # float green = [protocolor green]; + # float blue = [protocolor blue]; + # FloatValue* alpha_wrapper = [protocolor alpha]; + # float alpha = 1.0; + # if (alpha_wrapper != nil) ` + # alpha = [alpha_wrapper value]; + # ` + # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; + # ` + # static Color* toProto(UIColor* color) ` + # CGFloat red, green, blue, alpha; + # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) ` + # return nil; + # ` + # Color* result = [Color alloc] init]; + # [result setRed:red]; + # [result setGreen:green]; + # [result setBlue:blue]; + # if (alpha <= 0.9999) ` + # [result setAlpha:floatWrapperWithValue(alpha)]; + # ` + # [result autorelease]; + # return result; + # ` + # // ... + # Example (JavaScript): + # // ... + # var protoToCssColor = function(rgb_color) ` + # var redFrac = rgb_color.red || 0.0; + # var greenFrac = rgb_color.green || 0.0; + # var blueFrac = rgb_color.blue || 0.0; + # var red = Math.floor(redFrac * 255); + # var green = Math.floor(greenFrac * 255); + # var blue = Math.floor(blueFrac * 255); + # if (!('alpha' in rgb_color)) ` + # return rgbToCssColor_(red, green, blue); + # ` + # var alphaFrac = rgb_color.alpha.value || 0.0; + # var rgbParams = [red, green, blue].join(','); + # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); + # `; + # var rgbToCssColor_ = function(red, green, blue) ` + # var rgbNumber = new Number((red << 16) | (green << 8) | blue); + # var hexString = rgbNumber.toString(16); + # var missingZeros = 6 - hexString.length; + # var resultBuilder = ['#']; + # for (var i = 0; i < missingZeros; i++) ` + # resultBuilder.push('0'); + # ` + # resultBuilder.push(hexString); + # return resultBuilder.join(''); + # `; + # // ... + # Corresponds to the JSON property `tabColor` + # @return [Google::Apis::SheetsV4::Color] + attr_accessor :tab_color + + # The index of the sheet within the spreadsheet. + # When adding or updating sheet properties, if this field + # is excluded then the sheet will be added or moved to the end + # of the sheet list. When updating sheet indices or inserting + # sheets, movement is considered in "before the move" indexes. + # For example, if there were 3 sheets (S1, S2, S3) in order to + # move S1 ahead of S2 the index would have to be set to 2. A sheet + # index update request will be ignored if the requested index is + # identical to the sheets current index or if the requested new + # index is equal to the current sheet index + 1. + # Corresponds to the JSON property `index` + # @return [Fixnum] + attr_accessor :index + + # The ID of the sheet. Must be non-negative. + # This field cannot be changed once set. + # Corresponds to the JSON property `sheetId` + # @return [Fixnum] + attr_accessor :sheet_id + + # True if the sheet is an RTL sheet instead of an LTR sheet. + # Corresponds to the JSON property `rightToLeft` + # @return [Boolean] + attr_accessor :right_to_left + alias_method :right_to_left?, :right_to_left + + # True if the sheet is hidden in the UI, false if it's visible. + # Corresponds to the JSON property `hidden` + # @return [Boolean] + attr_accessor :hidden + alias_method :hidden?, :hidden + + # The type of sheet. Defaults to GRID. + # This field cannot be changed once set. + # Corresponds to the JSON property `sheetType` + # @return [String] + attr_accessor :sheet_type + + # Properties of a grid. + # Corresponds to the JSON property `gridProperties` + # @return [Google::Apis::SheetsV4::GridProperties] + attr_accessor :grid_properties + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @title = args[:title] if args.key?(:title) + @tab_color = args[:tab_color] if args.key?(:tab_color) + @index = args[:index] if args.key?(:index) + @sheet_id = args[:sheet_id] if args.key?(:sheet_id) + @right_to_left = args[:right_to_left] if args.key?(:right_to_left) + @hidden = args[:hidden] if args.key?(:hidden) + @sheet_type = args[:sheet_type] if args.key?(:sheet_type) + @grid_properties = args[:grid_properties] if args.key?(:grid_properties) + end + end + + # Updates properties of dimensions within the specified range. + class UpdateDimensionPropertiesRequest + include Google::Apis::Core::Hashable + + # The fields that should be updated. At least one field must be specified. + # The root `properties` is implied and should not be specified. + # A single `"*"` can be used as short-hand for listing every field. + # Corresponds to the JSON property `fields` + # @return [String] + attr_accessor :fields + + # Properties about a dimension. + # Corresponds to the JSON property `properties` + # @return [Google::Apis::SheetsV4::DimensionProperties] + attr_accessor :properties + + # A range along a single dimension on a sheet. + # All indexes are zero-based. + # Indexes are half open: the start index is inclusive + # and the end index is exclusive. + # Missing indexes indicate the range is unbounded on that side. + # Corresponds to the JSON property `range` + # @return [Google::Apis::SheetsV4::DimensionRange] + attr_accessor :range + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @fields = args[:fields] if args.key?(:fields) + @properties = args[:properties] if args.key?(:properties) + @range = args[:range] if args.key?(:range) + end + end + + # A combination of a source range and how to extend that source. + class SourceAndDestination + include Google::Apis::Core::Hashable + + # The number of rows or columns that data should be filled into. + # Positive numbers expand beyond the last row or last column + # of the source. Negative numbers expand before the first row + # or first column of the source. + # Corresponds to the JSON property `fillLength` + # @return [Fixnum] + attr_accessor :fill_length + + # A range on a sheet. + # All indexes are zero-based. + # Indexes are half open, e.g the start index is inclusive + # and the end index is exclusive -- [start_index, end_index). + # Missing indexes indicate the range is unbounded on that side. + # For example, if `"Sheet1"` is sheet ID 0, then: + # `Sheet1!A1:A1 == sheet_id: 0, + # start_row_index: 0, end_row_index: 1, + # start_column_index: 0, end_column_index: 1` + # `Sheet1!A3:B4 == sheet_id: 0, + # start_row_index: 2, end_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A:B == sheet_id: 0, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A5:B == sheet_id: 0, + # start_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1 == sheet_id:0` + # The start index must always be less than or equal to the end index. + # If the start index equals the end index, then the range is empty. + # Empty ranges are typically not meaningful and are usually rendered in the + # UI as `#REF!`. + # Corresponds to the JSON property `source` + # @return [Google::Apis::SheetsV4::GridRange] + attr_accessor :source + + # The dimension that data should be filled into. + # Corresponds to the JSON property `dimension` + # @return [String] + attr_accessor :dimension + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @fill_length = args[:fill_length] if args.key?(:fill_length) + @source = args[:source] if args.key?(:source) + @dimension = args[:dimension] if args.key?(:dimension) + end + end + + # A filter view. + class FilterView + include Google::Apis::Core::Hashable + + # The criteria for showing/hiding values per column. + # The map's key is the column index, and the value is the criteria for + # that column. + # Corresponds to the JSON property `criteria` + # @return [Hash] + attr_accessor :criteria + + # The name of the filter view. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + # A range on a sheet. + # All indexes are zero-based. + # Indexes are half open, e.g the start index is inclusive + # and the end index is exclusive -- [start_index, end_index). + # Missing indexes indicate the range is unbounded on that side. + # For example, if `"Sheet1"` is sheet ID 0, then: + # `Sheet1!A1:A1 == sheet_id: 0, + # start_row_index: 0, end_row_index: 1, + # start_column_index: 0, end_column_index: 1` + # `Sheet1!A3:B4 == sheet_id: 0, + # start_row_index: 2, end_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A:B == sheet_id: 0, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A5:B == sheet_id: 0, + # start_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1 == sheet_id:0` + # The start index must always be less than or equal to the end index. + # If the start index equals the end index, then the range is empty. + # Empty ranges are typically not meaningful and are usually rendered in the + # UI as `#REF!`. + # Corresponds to the JSON property `range` + # @return [Google::Apis::SheetsV4::GridRange] + attr_accessor :range + + # The sort order per column. Later specifications are used when values + # are equal in the earlier specifications. + # Corresponds to the JSON property `sortSpecs` + # @return [Array] + attr_accessor :sort_specs + + # The named range this filter view is backed by, if any. + # When writing, only one of range or named_range_id + # may be set. + # Corresponds to the JSON property `namedRangeId` + # @return [String] + attr_accessor :named_range_id + + # The ID of the filter view. + # Corresponds to the JSON property `filterViewId` + # @return [Fixnum] + attr_accessor :filter_view_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @criteria = args[:criteria] if args.key?(:criteria) + @title = args[:title] if args.key?(:title) + @range = args[:range] if args.key?(:range) + @sort_specs = args[:sort_specs] if args.key?(:sort_specs) + @named_range_id = args[:named_range_id] if args.key?(:named_range_id) + @filter_view_id = args[:filter_view_id] if args.key?(:filter_view_id) + end + end + # Properties referring a single dimension (either row or column). If both # BandedRange.row_properties and BandedRange.column_properties are # set, the fill colors are applied to cells according to the following rules: @@ -4470,6 +5865,109 @@ module Google class BandingProperties include Google::Apis::Core::Hashable + # Represents a color in the RGBA color space. This representation is designed + # for simplicity of conversion to/from color representations in various + # languages over compactness; for example, the fields of this representation + # can be trivially provided to the constructor of "java.awt.Color" in Java; it + # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" + # method in iOS; and, with just a little work, it can be easily formatted into + # a CSS "rgba()" string in JavaScript, as well. Here are some examples: + # Example (Java): + # import com.google.type.Color; + # // ... + # public static java.awt.Color fromProto(Color protocolor) ` + # float alpha = protocolor.hasAlpha() + # ? protocolor.getAlpha().getValue() + # : 1.0; + # return new java.awt.Color( + # protocolor.getRed(), + # protocolor.getGreen(), + # protocolor.getBlue(), + # alpha); + # ` + # public static Color toProto(java.awt.Color color) ` + # float red = (float) color.getRed(); + # float green = (float) color.getGreen(); + # float blue = (float) color.getBlue(); + # float denominator = 255.0; + # Color.Builder resultBuilder = + # Color + # .newBuilder() + # .setRed(red / denominator) + # .setGreen(green / denominator) + # .setBlue(blue / denominator); + # int alpha = color.getAlpha(); + # if (alpha != 255) ` + # result.setAlpha( + # FloatValue + # .newBuilder() + # .setValue(((float) alpha) / denominator) + # .build()); + # ` + # return resultBuilder.build(); + # ` + # // ... + # Example (iOS / Obj-C): + # // ... + # static UIColor* fromProto(Color* protocolor) ` + # float red = [protocolor red]; + # float green = [protocolor green]; + # float blue = [protocolor blue]; + # FloatValue* alpha_wrapper = [protocolor alpha]; + # float alpha = 1.0; + # if (alpha_wrapper != nil) ` + # alpha = [alpha_wrapper value]; + # ` + # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; + # ` + # static Color* toProto(UIColor* color) ` + # CGFloat red, green, blue, alpha; + # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) ` + # return nil; + # ` + # Color* result = [Color alloc] init]; + # [result setRed:red]; + # [result setGreen:green]; + # [result setBlue:blue]; + # if (alpha <= 0.9999) ` + # [result setAlpha:floatWrapperWithValue(alpha)]; + # ` + # [result autorelease]; + # return result; + # ` + # // ... + # Example (JavaScript): + # // ... + # var protoToCssColor = function(rgb_color) ` + # var redFrac = rgb_color.red || 0.0; + # var greenFrac = rgb_color.green || 0.0; + # var blueFrac = rgb_color.blue || 0.0; + # var red = Math.floor(redFrac * 255); + # var green = Math.floor(greenFrac * 255); + # var blue = Math.floor(blueFrac * 255); + # if (!('alpha' in rgb_color)) ` + # return rgbToCssColor_(red, green, blue); + # ` + # var alphaFrac = rgb_color.alpha.value || 0.0; + # var rgbParams = [red, green, blue].join(','); + # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); + # `; + # var rgbToCssColor_ = function(red, green, blue) ` + # var rgbNumber = new Number((red << 16) | (green << 8) | blue); + # var hexString = rgbNumber.toString(16); + # var missingZeros = 6 - hexString.length; + # var resultBuilder = ['#']; + # for (var i = 0; i < missingZeros; i++) ` + # resultBuilder.push('0'); + # ` + # resultBuilder.push(hexString); + # return resultBuilder.join(''); + # `; + # // ... + # Corresponds to the JSON property `secondBandColor` + # @return [Google::Apis::SheetsV4::Color] + attr_accessor :second_band_color + # Represents a color in the RGBA color space. This representation is designed # for simplicity of conversion to/from color representations in various # languages over compactness; for example, the fields of this representation @@ -4676,109 +6174,6 @@ module Google # @return [Google::Apis::SheetsV4::Color] attr_accessor :header_color - # Represents a color in the RGBA color space. This representation is designed - # for simplicity of conversion to/from color representations in various - # languages over compactness; for example, the fields of this representation - # can be trivially provided to the constructor of "java.awt.Color" in Java; it - # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" - # method in iOS; and, with just a little work, it can be easily formatted into - # a CSS "rgba()" string in JavaScript, as well. Here are some examples: - # Example (Java): - # import com.google.type.Color; - # // ... - # public static java.awt.Color fromProto(Color protocolor) ` - # float alpha = protocolor.hasAlpha() - # ? protocolor.getAlpha().getValue() - # : 1.0; - # return new java.awt.Color( - # protocolor.getRed(), - # protocolor.getGreen(), - # protocolor.getBlue(), - # alpha); - # ` - # public static Color toProto(java.awt.Color color) ` - # float red = (float) color.getRed(); - # float green = (float) color.getGreen(); - # float blue = (float) color.getBlue(); - # float denominator = 255.0; - # Color.Builder resultBuilder = - # Color - # .newBuilder() - # .setRed(red / denominator) - # .setGreen(green / denominator) - # .setBlue(blue / denominator); - # int alpha = color.getAlpha(); - # if (alpha != 255) ` - # result.setAlpha( - # FloatValue - # .newBuilder() - # .setValue(((float) alpha) / denominator) - # .build()); - # ` - # return resultBuilder.build(); - # ` - # // ... - # Example (iOS / Obj-C): - # // ... - # static UIColor* fromProto(Color* protocolor) ` - # float red = [protocolor red]; - # float green = [protocolor green]; - # float blue = [protocolor blue]; - # FloatValue* alpha_wrapper = [protocolor alpha]; - # float alpha = 1.0; - # if (alpha_wrapper != nil) ` - # alpha = [alpha_wrapper value]; - # ` - # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; - # ` - # static Color* toProto(UIColor* color) ` - # CGFloat red, green, blue, alpha; - # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) ` - # return nil; - # ` - # Color* result = [Color alloc] init]; - # [result setRed:red]; - # [result setGreen:green]; - # [result setBlue:blue]; - # if (alpha <= 0.9999) ` - # [result setAlpha:floatWrapperWithValue(alpha)]; - # ` - # [result autorelease]; - # return result; - # ` - # // ... - # Example (JavaScript): - # // ... - # var protoToCssColor = function(rgb_color) ` - # var redFrac = rgb_color.red || 0.0; - # var greenFrac = rgb_color.green || 0.0; - # var blueFrac = rgb_color.blue || 0.0; - # var red = Math.floor(redFrac * 255); - # var green = Math.floor(greenFrac * 255); - # var blue = Math.floor(blueFrac * 255); - # if (!('alpha' in rgb_color)) ` - # return rgbToCssColor_(red, green, blue); - # ` - # var alphaFrac = rgb_color.alpha.value || 0.0; - # var rgbParams = [red, green, blue].join(','); - # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); - # `; - # var rgbToCssColor_ = function(red, green, blue) ` - # var rgbNumber = new Number((red << 16) | (green << 8) | blue); - # var hexString = rgbNumber.toString(16); - # var missingZeros = 6 - hexString.length; - # var resultBuilder = ['#']; - # for (var i = 0; i < missingZeros; i++) ` - # resultBuilder.push('0'); - # ` - # resultBuilder.push(hexString); - # return resultBuilder.join(''); - # `; - # // ... - # Corresponds to the JSON property `secondBandColor` - # @return [Google::Apis::SheetsV4::Color] - attr_accessor :second_band_color - # Represents a color in the RGBA color space. This representation is designed # for simplicity of conversion to/from color representations in various # languages over compactness; for example, the fields of this representation @@ -4888,45 +6283,21 @@ module Google # Update properties of this object def update!(**args) + @second_band_color = args[:second_band_color] if args.key?(:second_band_color) @footer_color = args[:footer_color] if args.key?(:footer_color) @header_color = args[:header_color] if args.key?(:header_color) - @second_band_color = args[:second_band_color] if args.key?(:second_band_color) @first_band_color = args[:first_band_color] if args.key?(:first_band_color) end end - # A single grouping (either row or column) in a pivot table. - class PivotGroup + # The result of adding a new protected range. + class AddProtectedRangeResponse include Google::Apis::Core::Hashable - # The order the values in this group should be sorted. - # Corresponds to the JSON property `sortOrder` - # @return [String] - attr_accessor :sort_order - - # The column offset of the source range that this grouping is based on. - # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0` - # means this group refers to column `C`, whereas the offset `1` would refer - # to column `D`. - # Corresponds to the JSON property `sourceColumnOffset` - # @return [Fixnum] - attr_accessor :source_column_offset - - # True if the pivot table should include the totals for this grouping. - # Corresponds to the JSON property `showTotals` - # @return [Boolean] - attr_accessor :show_totals - alias_method :show_totals?, :show_totals - - # Information about which values in a pivot group should be used for sorting. - # Corresponds to the JSON property `valueBucket` - # @return [Google::Apis::SheetsV4::PivotGroupSortValueBucket] - attr_accessor :value_bucket - - # Metadata about values in the grouping. - # Corresponds to the JSON property `valueMetadata` - # @return [Array] - attr_accessor :value_metadata + # A protected range. + # Corresponds to the JSON property `protectedRange` + # @return [Google::Apis::SheetsV4::ProtectedRange] + attr_accessor :protected_range def initialize(**args) update!(**args) @@ -4934,319 +6305,14 @@ module Google # Update properties of this object def update!(**args) - @sort_order = args[:sort_order] if args.key?(:sort_order) - @source_column_offset = args[:source_column_offset] if args.key?(:source_column_offset) - @show_totals = args[:show_totals] if args.key?(:show_totals) - @value_bucket = args[:value_bucket] if args.key?(:value_bucket) - @value_metadata = args[:value_metadata] if args.key?(:value_metadata) + @protected_range = args[:protected_range] if args.key?(:protected_range) end end - # A range on a sheet. - # All indexes are zero-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if `"Sheet1"` is sheet ID 0, then: - # `Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1` - # `Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1 == sheet_id:0` - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as `#REF!`. - class GridRange + # The default filter associated with a sheet. + class BasicFilter include Google::Apis::Core::Hashable - # The sheet this range is on. - # Corresponds to the JSON property `sheetId` - # @return [Fixnum] - attr_accessor :sheet_id - - # The start column (inclusive) of the range, or not set if unbounded. - # Corresponds to the JSON property `startColumnIndex` - # @return [Fixnum] - attr_accessor :start_column_index - - # The start row (inclusive) of the range, or not set if unbounded. - # Corresponds to the JSON property `startRowIndex` - # @return [Fixnum] - attr_accessor :start_row_index - - # The end row (exclusive) of the range, or not set if unbounded. - # Corresponds to the JSON property `endRowIndex` - # @return [Fixnum] - attr_accessor :end_row_index - - # The end column (exclusive) of the range, or not set if unbounded. - # Corresponds to the JSON property `endColumnIndex` - # @return [Fixnum] - attr_accessor :end_column_index - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @sheet_id = args[:sheet_id] if args.key?(:sheet_id) - @start_column_index = args[:start_column_index] if args.key?(:start_column_index) - @start_row_index = args[:start_row_index] if args.key?(:start_row_index) - @end_row_index = args[:end_row_index] if args.key?(:end_row_index) - @end_column_index = args[:end_column_index] if args.key?(:end_column_index) - end - end - - # Deletes the requested sheet. - class DeleteSheetRequest - include Google::Apis::Core::Hashable - - # The ID of the sheet to delete. - # Corresponds to the JSON property `sheetId` - # @return [Fixnum] - attr_accessor :sheet_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @sheet_id = args[:sheet_id] if args.key?(:sheet_id) - end - end - - # Updates properties of the supplied banded range. - class UpdateBandingRequest - include Google::Apis::Core::Hashable - - # A banded (alternating colors) range in a sheet. - # Corresponds to the JSON property `bandedRange` - # @return [Google::Apis::SheetsV4::BandedRange] - attr_accessor :banded_range - - # The fields that should be updated. At least one field must be specified. - # The root `bandedRange` is implied and should not be specified. - # A single `"*"` can be used as short-hand for listing every field. - # Corresponds to the JSON property `fields` - # @return [String] - attr_accessor :fields - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @banded_range = args[:banded_range] if args.key?(:banded_range) - @fields = args[:fields] if args.key?(:fields) - end - end - - # The data included in a domain or series. - class ChartData - include Google::Apis::Core::Hashable - - # Source ranges for a chart. - # Corresponds to the JSON property `sourceRange` - # @return [Google::Apis::SheetsV4::ChartSourceRange] - attr_accessor :source_range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @source_range = args[:source_range] if args.key?(:source_range) - end - end - - # A sheet in a spreadsheet. - class Sheet - include Google::Apis::Core::Hashable - - # Properties of a sheet. - # Corresponds to the JSON property `properties` - # @return [Google::Apis::SheetsV4::SheetProperties] - attr_accessor :properties - - # The specifications of every chart on this sheet. - # Corresponds to the JSON property `charts` - # @return [Array] - attr_accessor :charts - - # The filter views in this sheet. - # Corresponds to the JSON property `filterViews` - # @return [Array] - attr_accessor :filter_views - - # The conditional format rules in this sheet. - # Corresponds to the JSON property `conditionalFormats` - # @return [Array] - attr_accessor :conditional_formats - - # The protected ranges in this sheet. - # Corresponds to the JSON property `protectedRanges` - # @return [Array] - attr_accessor :protected_ranges - - # The default filter associated with a sheet. - # Corresponds to the JSON property `basicFilter` - # @return [Google::Apis::SheetsV4::BasicFilter] - attr_accessor :basic_filter - - # The ranges that are merged together. - # Corresponds to the JSON property `merges` - # @return [Array] - attr_accessor :merges - - # Data in the grid, if this is a grid sheet. - # The number of GridData objects returned is dependent on the number of - # ranges requested on this sheet. For example, if this is representing - # `Sheet1`, and the spreadsheet was requested with ranges - # `Sheet1!A1:C10` and `Sheet1!D15:E20`, then the first GridData will have a - # startRow/startColumn of `0`, - # while the second one will have `startRow 14` (zero-based row 15), - # and `startColumn 3` (zero-based column D). - # Corresponds to the JSON property `data` - # @return [Array] - attr_accessor :data - - # The banded (i.e. alternating colors) ranges on this sheet. - # Corresponds to the JSON property `bandedRanges` - # @return [Array] - attr_accessor :banded_ranges - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @properties = args[:properties] if args.key?(:properties) - @charts = args[:charts] if args.key?(:charts) - @filter_views = args[:filter_views] if args.key?(:filter_views) - @conditional_formats = args[:conditional_formats] if args.key?(:conditional_formats) - @protected_ranges = args[:protected_ranges] if args.key?(:protected_ranges) - @basic_filter = args[:basic_filter] if args.key?(:basic_filter) - @merges = args[:merges] if args.key?(:merges) - @data = args[:data] if args.key?(:data) - @banded_ranges = args[:banded_ranges] if args.key?(:banded_ranges) - end - end - - # Copies data from the source to the destination. - class CopyPasteRequest - include Google::Apis::Core::Hashable - - # What kind of data to paste. - # Corresponds to the JSON property `pasteType` - # @return [String] - attr_accessor :paste_type - - # How that data should be oriented when pasting. - # Corresponds to the JSON property `pasteOrientation` - # @return [String] - attr_accessor :paste_orientation - - # A range on a sheet. - # All indexes are zero-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if `"Sheet1"` is sheet ID 0, then: - # `Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1` - # `Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1 == sheet_id:0` - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as `#REF!`. - # Corresponds to the JSON property `source` - # @return [Google::Apis::SheetsV4::GridRange] - attr_accessor :source - - # A range on a sheet. - # All indexes are zero-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if `"Sheet1"` is sheet ID 0, then: - # `Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1` - # `Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1 == sheet_id:0` - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as `#REF!`. - # Corresponds to the JSON property `destination` - # @return [Google::Apis::SheetsV4::GridRange] - attr_accessor :destination - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @paste_type = args[:paste_type] if args.key?(:paste_type) - @paste_orientation = args[:paste_orientation] if args.key?(:paste_orientation) - @source = args[:source] if args.key?(:source) - @destination = args[:destination] if args.key?(:destination) - end - end - - # Updates all cells in a range with new data. - class UpdateCellsRequest - include Google::Apis::Core::Hashable - - # The data to write. - # Corresponds to the JSON property `rows` - # @return [Array] - attr_accessor :rows - - # The fields of CellData that should be updated. - # At least one field must be specified. - # The root is the CellData; 'row.values.' should not be specified. - # A single `"*"` can be used as short-hand for listing every field. - # Corresponds to the JSON property `fields` - # @return [String] - attr_accessor :fields - - # A coordinate in a sheet. - # All indexes are zero-based. - # Corresponds to the JSON property `start` - # @return [Google::Apis::SheetsV4::GridCoordinate] - attr_accessor :start - # A range on a sheet. # All indexes are zero-based. # Indexes are half open, e.g the start index is inclusive @@ -5273,1094 +6339,28 @@ module Google # @return [Google::Apis::SheetsV4::GridRange] attr_accessor :range + # The criteria for showing/hiding values per column. + # The map's key is the column index, and the value is the criteria for + # that column. + # Corresponds to the JSON property `criteria` + # @return [Hash] + attr_accessor :criteria + + # The sort order per column. Later specifications are used when values + # are equal in the earlier specifications. + # Corresponds to the JSON property `sortSpecs` + # @return [Array] + attr_accessor :sort_specs + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @rows = args[:rows] if args.key?(:rows) - @fields = args[:fields] if args.key?(:fields) - @start = args[:start] if args.key?(:start) @range = args[:range] if args.key?(:range) - end - end - - # The kinds of value that a cell in a spreadsheet can have. - class ExtendedValue - include Google::Apis::Core::Hashable - - # Represents a formula. - # Corresponds to the JSON property `formulaValue` - # @return [String] - attr_accessor :formula_value - - # An error in a cell. - # Corresponds to the JSON property `errorValue` - # @return [Google::Apis::SheetsV4::ErrorValue] - attr_accessor :error_value - - # Represents a boolean value. - # Corresponds to the JSON property `boolValue` - # @return [Boolean] - attr_accessor :bool_value - alias_method :bool_value?, :bool_value - - # Represents a double value. - # Note: Dates, Times and DateTimes are represented as doubles in - # "serial number" format. - # Corresponds to the JSON property `numberValue` - # @return [Float] - attr_accessor :number_value - - # Represents a string value. - # Leading single quotes are not included. For example, if the user typed - # `'123` into the UI, this would be represented as a `stringValue` of - # `"123"`. - # Corresponds to the JSON property `stringValue` - # @return [String] - attr_accessor :string_value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @formula_value = args[:formula_value] if args.key?(:formula_value) - @error_value = args[:error_value] if args.key?(:error_value) - @bool_value = args[:bool_value] if args.key?(:bool_value) - @number_value = args[:number_value] if args.key?(:number_value) - @string_value = args[:string_value] if args.key?(:string_value) - end - end - - # The reply for batch updating a spreadsheet. - class BatchUpdateSpreadsheetResponse - include Google::Apis::Core::Hashable - - # The spreadsheet the updates were applied to. - # Corresponds to the JSON property `spreadsheetId` - # @return [String] - attr_accessor :spreadsheet_id - - # Resource that represents a spreadsheet. - # Corresponds to the JSON property `updatedSpreadsheet` - # @return [Google::Apis::SheetsV4::Spreadsheet] - attr_accessor :updated_spreadsheet - - # The reply of the updates. This maps 1:1 with the updates, although - # replies to some requests may be empty. - # Corresponds to the JSON property `replies` - # @return [Array] - attr_accessor :replies - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) - @updated_spreadsheet = args[:updated_spreadsheet] if args.key?(:updated_spreadsheet) - @replies = args[:replies] if args.key?(:replies) - end - end - - # A rule that applies a gradient color scale format, based on - # the interpolation points listed. The format of a cell will vary - # based on its contents as compared to the values of the interpolation - # points. - class GradientRule - include Google::Apis::Core::Hashable - - # A single interpolation point on a gradient conditional format. - # These pin the gradient color scale according to the color, - # type and value chosen. - # Corresponds to the JSON property `maxpoint` - # @return [Google::Apis::SheetsV4::InterpolationPoint] - attr_accessor :maxpoint - - # A single interpolation point on a gradient conditional format. - # These pin the gradient color scale according to the color, - # type and value chosen. - # Corresponds to the JSON property `midpoint` - # @return [Google::Apis::SheetsV4::InterpolationPoint] - attr_accessor :midpoint - - # A single interpolation point on a gradient conditional format. - # These pin the gradient color scale according to the color, - # type and value chosen. - # Corresponds to the JSON property `minpoint` - # @return [Google::Apis::SheetsV4::InterpolationPoint] - attr_accessor :minpoint - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @maxpoint = args[:maxpoint] if args.key?(:maxpoint) - @midpoint = args[:midpoint] if args.key?(:midpoint) - @minpoint = args[:minpoint] if args.key?(:minpoint) - end - end - - # Moves data from the source to the destination. - class CutPasteRequest - include Google::Apis::Core::Hashable - - # What kind of data to paste. All the source data will be cut, regardless - # of what is pasted. - # Corresponds to the JSON property `pasteType` - # @return [String] - attr_accessor :paste_type - - # A range on a sheet. - # All indexes are zero-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if `"Sheet1"` is sheet ID 0, then: - # `Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1` - # `Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1 == sheet_id:0` - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as `#REF!`. - # Corresponds to the JSON property `source` - # @return [Google::Apis::SheetsV4::GridRange] - attr_accessor :source - - # A coordinate in a sheet. - # All indexes are zero-based. - # Corresponds to the JSON property `destination` - # @return [Google::Apis::SheetsV4::GridCoordinate] - attr_accessor :destination - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @paste_type = args[:paste_type] if args.key?(:paste_type) - @source = args[:source] if args.key?(:source) - @destination = args[:destination] if args.key?(:destination) - end - end - - # The location an object is overlaid on top of a grid. - class OverlayPosition - include Google::Apis::Core::Hashable - - # The width of the object, in pixels. Defaults to 600. - # Corresponds to the JSON property `widthPixels` - # @return [Fixnum] - attr_accessor :width_pixels - - # A coordinate in a sheet. - # All indexes are zero-based. - # Corresponds to the JSON property `anchorCell` - # @return [Google::Apis::SheetsV4::GridCoordinate] - attr_accessor :anchor_cell - - # The horizontal offset, in pixels, that the object is offset - # from the anchor cell. - # Corresponds to the JSON property `offsetXPixels` - # @return [Fixnum] - attr_accessor :offset_x_pixels - - # The height of the object, in pixels. Defaults to 371. - # Corresponds to the JSON property `heightPixels` - # @return [Fixnum] - attr_accessor :height_pixels - - # The vertical offset, in pixels, that the object is offset - # from the anchor cell. - # Corresponds to the JSON property `offsetYPixels` - # @return [Fixnum] - attr_accessor :offset_y_pixels - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @width_pixels = args[:width_pixels] if args.key?(:width_pixels) - @anchor_cell = args[:anchor_cell] if args.key?(:anchor_cell) - @offset_x_pixels = args[:offset_x_pixels] if args.key?(:offset_x_pixels) - @height_pixels = args[:height_pixels] if args.key?(:height_pixels) - @offset_y_pixels = args[:offset_y_pixels] if args.key?(:offset_y_pixels) - end - end - - # Fills in more data based on existing data. - class AutoFillRequest - include Google::Apis::Core::Hashable - - # True if we should generate data with the "alternate" series. - # This differs based on the type and amount of source data. - # Corresponds to the JSON property `useAlternateSeries` - # @return [Boolean] - attr_accessor :use_alternate_series - alias_method :use_alternate_series?, :use_alternate_series - - # A range on a sheet. - # All indexes are zero-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if `"Sheet1"` is sheet ID 0, then: - # `Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1` - # `Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1 == sheet_id:0` - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as `#REF!`. - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV4::GridRange] - attr_accessor :range - - # A combination of a source range and how to extend that source. - # Corresponds to the JSON property `sourceAndDestination` - # @return [Google::Apis::SheetsV4::SourceAndDestination] - attr_accessor :source_and_destination - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @use_alternate_series = args[:use_alternate_series] if args.key?(:use_alternate_series) - @range = args[:range] if args.key?(:range) - @source_and_destination = args[:source_and_destination] if args.key?(:source_and_destination) - end - end - - # A pie chart. - class PieChartSpec - include Google::Apis::Core::Hashable - - # Where the legend of the pie chart should be drawn. - # Corresponds to the JSON property `legendPosition` - # @return [String] - attr_accessor :legend_position - - # The data included in a domain or series. - # Corresponds to the JSON property `series` - # @return [Google::Apis::SheetsV4::ChartData] - attr_accessor :series - - # The size of the hole in the pie chart. - # Corresponds to the JSON property `pieHole` - # @return [Float] - attr_accessor :pie_hole - - # True if the pie is three dimensional. - # Corresponds to the JSON property `threeDimensional` - # @return [Boolean] - attr_accessor :three_dimensional - alias_method :three_dimensional?, :three_dimensional - - # The data included in a domain or series. - # Corresponds to the JSON property `domain` - # @return [Google::Apis::SheetsV4::ChartData] - attr_accessor :domain - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @legend_position = args[:legend_position] if args.key?(:legend_position) - @series = args[:series] if args.key?(:series) - @pie_hole = args[:pie_hole] if args.key?(:pie_hole) - @three_dimensional = args[:three_dimensional] if args.key?(:three_dimensional) - @domain = args[:domain] if args.key?(:domain) - end - end - - # Updates properties of the sheet with the specified - # sheetId. - class UpdateSheetPropertiesRequest - include Google::Apis::Core::Hashable - - # The fields that should be updated. At least one field must be specified. - # The root `properties` is implied and should not be specified. - # A single `"*"` can be used as short-hand for listing every field. - # Corresponds to the JSON property `fields` - # @return [String] - attr_accessor :fields - - # Properties of a sheet. - # Corresponds to the JSON property `properties` - # @return [Google::Apis::SheetsV4::SheetProperties] - attr_accessor :properties - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @fields = args[:fields] if args.key?(:fields) - @properties = args[:properties] if args.key?(:properties) - end - end - - # A rule that may or may not match, depending on the condition. - class BooleanRule - include Google::Apis::Core::Hashable - - # A condition that can evaluate to true or false. - # BooleanConditions are used by conditional formatting, - # data validation, and the criteria in filters. - # Corresponds to the JSON property `condition` - # @return [Google::Apis::SheetsV4::BooleanCondition] - attr_accessor :condition - - # The format of a cell. - # Corresponds to the JSON property `format` - # @return [Google::Apis::SheetsV4::CellFormat] - attr_accessor :format - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @condition = args[:condition] if args.key?(:condition) - @format = args[:format] if args.key?(:format) - end - end - - # Appends rows or columns to the end of a sheet. - class AppendDimensionRequest - include Google::Apis::Core::Hashable - - # The sheet to append rows or columns to. - # Corresponds to the JSON property `sheetId` - # @return [Fixnum] - attr_accessor :sheet_id - - # The number of rows or columns to append. - # Corresponds to the JSON property `length` - # @return [Fixnum] - attr_accessor :length - - # Whether rows or columns should be appended. - # Corresponds to the JSON property `dimension` - # @return [String] - attr_accessor :dimension - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @sheet_id = args[:sheet_id] if args.key?(:sheet_id) - @length = args[:length] if args.key?(:length) - @dimension = args[:dimension] if args.key?(:dimension) - end - end - - # Adds a filter view. - class AddFilterViewRequest - include Google::Apis::Core::Hashable - - # A filter view. - # Corresponds to the JSON property `filter` - # @return [Google::Apis::SheetsV4::FilterView] - attr_accessor :filter - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @filter = args[:filter] if args.key?(:filter) - end - end - - # Properties of a grid. - class GridProperties - include Google::Apis::Core::Hashable - - # The number of rows in the grid. - # Corresponds to the JSON property `rowCount` - # @return [Fixnum] - attr_accessor :row_count - - # The number of columns in the grid. - # Corresponds to the JSON property `columnCount` - # @return [Fixnum] - attr_accessor :column_count - - # The number of rows that are frozen in the grid. - # Corresponds to the JSON property `frozenRowCount` - # @return [Fixnum] - attr_accessor :frozen_row_count - - # The number of columns that are frozen in the grid. - # Corresponds to the JSON property `frozenColumnCount` - # @return [Fixnum] - attr_accessor :frozen_column_count - - # True if the grid isn't showing gridlines in the UI. - # Corresponds to the JSON property `hideGridlines` - # @return [Boolean] - attr_accessor :hide_gridlines - alias_method :hide_gridlines?, :hide_gridlines - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @row_count = args[:row_count] if args.key?(:row_count) - @column_count = args[:column_count] if args.key?(:column_count) - @frozen_row_count = args[:frozen_row_count] if args.key?(:frozen_row_count) - @frozen_column_count = args[:frozen_column_count] if args.key?(:frozen_column_count) - @hide_gridlines = args[:hide_gridlines] if args.key?(:hide_gridlines) - end - end - - # Removes the named range with the given ID from the spreadsheet. - class DeleteNamedRangeRequest - include Google::Apis::Core::Hashable - - # The ID of the named range to delete. - # Corresponds to the JSON property `namedRangeId` - # @return [String] - attr_accessor :named_range_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @named_range_id = args[:named_range_id] if args.key?(:named_range_id) - end - end - - # Adds a chart to a sheet in the spreadsheet. - class AddChartRequest - include Google::Apis::Core::Hashable - - # A chart embedded in a sheet. - # Corresponds to the JSON property `chart` - # @return [Google::Apis::SheetsV4::EmbeddedChart] - attr_accessor :chart - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @chart = args[:chart] if args.key?(:chart) - end - end - - # Sets a data validation rule to every cell in the range. - # To clear validation in a range, call this with no rule specified. - class SetDataValidationRequest - include Google::Apis::Core::Hashable - - # A data validation rule. - # Corresponds to the JSON property `rule` - # @return [Google::Apis::SheetsV4::DataValidationRule] - attr_accessor :rule - - # A range on a sheet. - # All indexes are zero-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if `"Sheet1"` is sheet ID 0, then: - # `Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1` - # `Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1 == sheet_id:0` - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as `#REF!`. - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV4::GridRange] - attr_accessor :range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @rule = args[:rule] if args.key?(:rule) - @range = args[:range] if args.key?(:range) - end - end - - # A single kind of update to apply to a spreadsheet. - class Request - include Google::Apis::Core::Hashable - - # Update an embedded object's position (such as a moving or resizing a - # chart or image). - # Corresponds to the JSON property `updateEmbeddedObjectPosition` - # @return [Google::Apis::SheetsV4::UpdateEmbeddedObjectPositionRequest] - attr_accessor :update_embedded_object_position - - # Removes the named range with the given ID from the spreadsheet. - # Corresponds to the JSON property `deleteNamedRange` - # @return [Google::Apis::SheetsV4::DeleteNamedRangeRequest] - attr_accessor :delete_named_range - - # Updates properties of the named range with the specified - # namedRangeId. - # Corresponds to the JSON property `updateNamedRange` - # @return [Google::Apis::SheetsV4::UpdateNamedRangeRequest] - attr_accessor :update_named_range - - # Adds a filter view. - # Corresponds to the JSON property `addFilterView` - # @return [Google::Apis::SheetsV4::AddFilterViewRequest] - attr_accessor :add_filter_view - - # Updates properties of a spreadsheet. - # Corresponds to the JSON property `updateSpreadsheetProperties` - # @return [Google::Apis::SheetsV4::UpdateSpreadsheetPropertiesRequest] - attr_accessor :update_spreadsheet_properties - - # Appends rows or columns to the end of a sheet. - # Corresponds to the JSON property `appendDimension` - # @return [Google::Apis::SheetsV4::AppendDimensionRequest] - attr_accessor :append_dimension - - # Unmerges cells in the given range. - # Corresponds to the JSON property `unmergeCells` - # @return [Google::Apis::SheetsV4::UnmergeCellsRequest] - attr_accessor :unmerge_cells - - # Inserts cells into a range, shifting the existing cells over or down. - # Corresponds to the JSON property `insertRange` - # @return [Google::Apis::SheetsV4::InsertRangeRequest] - attr_accessor :insert_range - - # Updates an existing protected range with the specified - # protectedRangeId. - # Corresponds to the JSON property `updateProtectedRange` - # @return [Google::Apis::SheetsV4::UpdateProtectedRangeRequest] - attr_accessor :update_protected_range - - # Deletes a particular filter view. - # Corresponds to the JSON property `deleteFilterView` - # @return [Google::Apis::SheetsV4::DeleteFilterViewRequest] - attr_accessor :delete_filter_view - - # Clears the basic filter, if any exists on the sheet. - # Corresponds to the JSON property `clearBasicFilter` - # @return [Google::Apis::SheetsV4::ClearBasicFilterRequest] - attr_accessor :clear_basic_filter - - # Sorts data in rows based on a sort order per column. - # Corresponds to the JSON property `sortRange` - # @return [Google::Apis::SheetsV4::SortRangeRequest] - attr_accessor :sort_range - - # Updates all cells in the range to the values in the given Cell object. - # Only the fields listed in the fields field are updated; others are - # unchanged. - # If writing a cell with a formula, the formula's ranges will automatically - # increment for each field in the range. - # For example, if writing a cell with formula `=A1` into range B2:C4, - # B2 would be `=A1`, B3 would be `=A2`, B4 would be `=A3`, - # C2 would be `=B1`, C3 would be `=B2`, C4 would be `=B3`. - # To keep the formula's ranges static, use the `$` indicator. - # For example, use the formula `=$A$1` to prevent both the row and the - # column from incrementing. - # Corresponds to the JSON property `repeatCell` - # @return [Google::Apis::SheetsV4::RepeatCellRequest] - attr_accessor :repeat_cell - - # Sets a data validation rule to every cell in the range. - # To clear validation in a range, call this with no rule specified. - # Corresponds to the JSON property `setDataValidation` - # @return [Google::Apis::SheetsV4::SetDataValidationRequest] - attr_accessor :set_data_validation - - # Updates all cells in a range with new data. - # Corresponds to the JSON property `updateCells` - # @return [Google::Apis::SheetsV4::UpdateCellsRequest] - attr_accessor :update_cells - - # Adds a new sheet. - # When a sheet is added at a given index, - # all subsequent sheets' indexes are incremented. - # To add an object sheet, use AddChartRequest instead and specify - # EmbeddedObjectPosition.sheetId or - # EmbeddedObjectPosition.newSheet. - # Corresponds to the JSON property `addSheet` - # @return [Google::Apis::SheetsV4::AddSheetRequest] - attr_accessor :add_sheet - - # Updates properties of the filter view. - # Corresponds to the JSON property `updateFilterView` - # @return [Google::Apis::SheetsV4::UpdateFilterViewRequest] - attr_accessor :update_filter_view - - # Updates properties of the sheet with the specified - # sheetId. - # Corresponds to the JSON property `updateSheetProperties` - # @return [Google::Apis::SheetsV4::UpdateSheetPropertiesRequest] - attr_accessor :update_sheet_properties - - # Updates properties of dimensions within the specified range. - # Corresponds to the JSON property `updateDimensionProperties` - # @return [Google::Apis::SheetsV4::UpdateDimensionPropertiesRequest] - attr_accessor :update_dimension_properties - - # Deletes the requested sheet. - # Corresponds to the JSON property `deleteSheet` - # @return [Google::Apis::SheetsV4::DeleteSheetRequest] - attr_accessor :delete_sheet - - # Finds and replaces data in cells over a range, sheet, or all sheets. - # Corresponds to the JSON property `findReplace` - # @return [Google::Apis::SheetsV4::FindReplaceRequest] - attr_accessor :find_replace - - # Adds a new protected range. - # Corresponds to the JSON property `addProtectedRange` - # @return [Google::Apis::SheetsV4::AddProtectedRangeRequest] - attr_accessor :add_protected_range - - # Deletes the protected range with the given ID. - # Corresponds to the JSON property `deleteProtectedRange` - # @return [Google::Apis::SheetsV4::DeleteProtectedRangeRequest] - attr_accessor :delete_protected_range - - # Updates a conditional format rule at the given index, - # or moves a conditional format rule to another index. - # Corresponds to the JSON property `updateConditionalFormatRule` - # @return [Google::Apis::SheetsV4::UpdateConditionalFormatRuleRequest] - attr_accessor :update_conditional_format_rule - - # Sets the basic filter associated with a sheet. - # Corresponds to the JSON property `setBasicFilter` - # @return [Google::Apis::SheetsV4::SetBasicFilterRequest] - attr_accessor :set_basic_filter - - # Merges all cells in the range. - # Corresponds to the JSON property `mergeCells` - # @return [Google::Apis::SheetsV4::MergeCellsRequest] - attr_accessor :merge_cells - - # Updates properties of the supplied banded range. - # Corresponds to the JSON property `updateBanding` - # @return [Google::Apis::SheetsV4::UpdateBandingRequest] - attr_accessor :update_banding - - # Adds a chart to a sheet in the spreadsheet. - # Corresponds to the JSON property `addChart` - # @return [Google::Apis::SheetsV4::AddChartRequest] - attr_accessor :add_chart - - # Deletes a conditional format rule at the given index. - # All subsequent rules' indexes are decremented. - # Corresponds to the JSON property `deleteConditionalFormatRule` - # @return [Google::Apis::SheetsV4::DeleteConditionalFormatRuleRequest] - attr_accessor :delete_conditional_format_rule - - # Adds a new banded range to the spreadsheet. - # Corresponds to the JSON property `addBanding` - # @return [Google::Apis::SheetsV4::AddBandingRequest] - attr_accessor :add_banding - - # Removes the banded range with the given ID from the spreadsheet. - # Corresponds to the JSON property `deleteBanding` - # @return [Google::Apis::SheetsV4::DeleteBandingRequest] - attr_accessor :delete_banding - - # Updates a chart's specifications. - # (This does not move or resize a chart. To move or resize a chart, use - # UpdateEmbeddedObjectPositionRequest.) - # Corresponds to the JSON property `updateChartSpec` - # @return [Google::Apis::SheetsV4::UpdateChartSpecRequest] - attr_accessor :update_chart_spec - - # Deletes a range of cells, shifting other cells into the deleted area. - # Corresponds to the JSON property `deleteRange` - # @return [Google::Apis::SheetsV4::DeleteRangeRequest] - attr_accessor :delete_range - - # Deletes the dimensions from the sheet. - # Corresponds to the JSON property `deleteDimension` - # @return [Google::Apis::SheetsV4::DeleteDimensionRequest] - attr_accessor :delete_dimension - - # Deletes the embedded object with the given ID. - # Corresponds to the JSON property `deleteEmbeddedObject` - # @return [Google::Apis::SheetsV4::DeleteEmbeddedObjectRequest] - attr_accessor :delete_embedded_object - - # Inserts data into the spreadsheet starting at the specified coordinate. - # Corresponds to the JSON property `pasteData` - # @return [Google::Apis::SheetsV4::PasteDataRequest] - attr_accessor :paste_data - - # Adds a new conditional format rule at the given index. - # All subsequent rules' indexes are incremented. - # Corresponds to the JSON property `addConditionalFormatRule` - # @return [Google::Apis::SheetsV4::AddConditionalFormatRuleRequest] - attr_accessor :add_conditional_format_rule - - # Updates the borders of a range. - # If a field is not set in the request, that means the border remains as-is. - # For example, with two subsequent UpdateBordersRequest: - # 1. range: A1:A5 `` top: RED, bottom: WHITE `` - # 2. range: A1:A5 `` left: BLUE `` - # That would result in A1:A5 having a borders of - # `` top: RED, bottom: WHITE, left: BLUE ``. - # If you want to clear a border, explicitly set the style to - # NONE. - # Corresponds to the JSON property `updateBorders` - # @return [Google::Apis::SheetsV4::UpdateBordersRequest] - attr_accessor :update_borders - - # Automatically resizes one or more dimensions based on the contents - # of the cells in that dimension. - # Corresponds to the JSON property `autoResizeDimensions` - # @return [Google::Apis::SheetsV4::AutoResizeDimensionsRequest] - attr_accessor :auto_resize_dimensions - - # Duplicates the contents of a sheet. - # Corresponds to the JSON property `duplicateSheet` - # @return [Google::Apis::SheetsV4::DuplicateSheetRequest] - attr_accessor :duplicate_sheet - - # Duplicates a particular filter view. - # Corresponds to the JSON property `duplicateFilterView` - # @return [Google::Apis::SheetsV4::DuplicateFilterViewRequest] - attr_accessor :duplicate_filter_view - - # Moves data from the source to the destination. - # Corresponds to the JSON property `cutPaste` - # @return [Google::Apis::SheetsV4::CutPasteRequest] - attr_accessor :cut_paste - - # Adds new cells after the last row with data in a sheet, - # inserting new rows into the sheet if necessary. - # Corresponds to the JSON property `appendCells` - # @return [Google::Apis::SheetsV4::AppendCellsRequest] - attr_accessor :append_cells - - # Adds a named range to the spreadsheet. - # Corresponds to the JSON property `addNamedRange` - # @return [Google::Apis::SheetsV4::AddNamedRangeRequest] - attr_accessor :add_named_range - - # Fills in more data based on existing data. - # Corresponds to the JSON property `autoFill` - # @return [Google::Apis::SheetsV4::AutoFillRequest] - attr_accessor :auto_fill - - # Moves one or more rows or columns. - # Corresponds to the JSON property `moveDimension` - # @return [Google::Apis::SheetsV4::MoveDimensionRequest] - attr_accessor :move_dimension - - # Splits a column of text into multiple columns, - # based on a delimiter in each cell. - # Corresponds to the JSON property `textToColumns` - # @return [Google::Apis::SheetsV4::TextToColumnsRequest] - attr_accessor :text_to_columns - - # Inserts rows or columns in a sheet at a particular index. - # Corresponds to the JSON property `insertDimension` - # @return [Google::Apis::SheetsV4::InsertDimensionRequest] - attr_accessor :insert_dimension - - # Copies data from the source to the destination. - # Corresponds to the JSON property `copyPaste` - # @return [Google::Apis::SheetsV4::CopyPasteRequest] - attr_accessor :copy_paste - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @update_embedded_object_position = args[:update_embedded_object_position] if args.key?(:update_embedded_object_position) - @delete_named_range = args[:delete_named_range] if args.key?(:delete_named_range) - @update_named_range = args[:update_named_range] if args.key?(:update_named_range) - @add_filter_view = args[:add_filter_view] if args.key?(:add_filter_view) - @update_spreadsheet_properties = args[:update_spreadsheet_properties] if args.key?(:update_spreadsheet_properties) - @append_dimension = args[:append_dimension] if args.key?(:append_dimension) - @unmerge_cells = args[:unmerge_cells] if args.key?(:unmerge_cells) - @insert_range = args[:insert_range] if args.key?(:insert_range) - @update_protected_range = args[:update_protected_range] if args.key?(:update_protected_range) - @delete_filter_view = args[:delete_filter_view] if args.key?(:delete_filter_view) - @clear_basic_filter = args[:clear_basic_filter] if args.key?(:clear_basic_filter) - @sort_range = args[:sort_range] if args.key?(:sort_range) - @repeat_cell = args[:repeat_cell] if args.key?(:repeat_cell) - @set_data_validation = args[:set_data_validation] if args.key?(:set_data_validation) - @update_cells = args[:update_cells] if args.key?(:update_cells) - @add_sheet = args[:add_sheet] if args.key?(:add_sheet) - @update_filter_view = args[:update_filter_view] if args.key?(:update_filter_view) - @update_sheet_properties = args[:update_sheet_properties] if args.key?(:update_sheet_properties) - @update_dimension_properties = args[:update_dimension_properties] if args.key?(:update_dimension_properties) - @delete_sheet = args[:delete_sheet] if args.key?(:delete_sheet) - @find_replace = args[:find_replace] if args.key?(:find_replace) - @add_protected_range = args[:add_protected_range] if args.key?(:add_protected_range) - @delete_protected_range = args[:delete_protected_range] if args.key?(:delete_protected_range) - @update_conditional_format_rule = args[:update_conditional_format_rule] if args.key?(:update_conditional_format_rule) - @set_basic_filter = args[:set_basic_filter] if args.key?(:set_basic_filter) - @merge_cells = args[:merge_cells] if args.key?(:merge_cells) - @update_banding = args[:update_banding] if args.key?(:update_banding) - @add_chart = args[:add_chart] if args.key?(:add_chart) - @delete_conditional_format_rule = args[:delete_conditional_format_rule] if args.key?(:delete_conditional_format_rule) - @add_banding = args[:add_banding] if args.key?(:add_banding) - @delete_banding = args[:delete_banding] if args.key?(:delete_banding) - @update_chart_spec = args[:update_chart_spec] if args.key?(:update_chart_spec) - @delete_range = args[:delete_range] if args.key?(:delete_range) - @delete_dimension = args[:delete_dimension] if args.key?(:delete_dimension) - @delete_embedded_object = args[:delete_embedded_object] if args.key?(:delete_embedded_object) - @paste_data = args[:paste_data] if args.key?(:paste_data) - @add_conditional_format_rule = args[:add_conditional_format_rule] if args.key?(:add_conditional_format_rule) - @update_borders = args[:update_borders] if args.key?(:update_borders) - @auto_resize_dimensions = args[:auto_resize_dimensions] if args.key?(:auto_resize_dimensions) - @duplicate_sheet = args[:duplicate_sheet] if args.key?(:duplicate_sheet) - @duplicate_filter_view = args[:duplicate_filter_view] if args.key?(:duplicate_filter_view) - @cut_paste = args[:cut_paste] if args.key?(:cut_paste) - @append_cells = args[:append_cells] if args.key?(:append_cells) - @add_named_range = args[:add_named_range] if args.key?(:add_named_range) - @auto_fill = args[:auto_fill] if args.key?(:auto_fill) - @move_dimension = args[:move_dimension] if args.key?(:move_dimension) - @text_to_columns = args[:text_to_columns] if args.key?(:text_to_columns) - @insert_dimension = args[:insert_dimension] if args.key?(:insert_dimension) - @copy_paste = args[:copy_paste] if args.key?(:copy_paste) - end - end - - # The response when retrieving more than one range of values in a spreadsheet. - class BatchGetValuesResponse - include Google::Apis::Core::Hashable - - # The requested values. The order of the ValueRanges is the same as the - # order of the requested ranges. - # Corresponds to the JSON property `valueRanges` - # @return [Array] - attr_accessor :value_ranges - - # The ID of the spreadsheet the data was retrieved from. - # Corresponds to the JSON property `spreadsheetId` - # @return [String] - attr_accessor :spreadsheet_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @value_ranges = args[:value_ranges] if args.key?(:value_ranges) - @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) - end - end - - # Inserts rows or columns in a sheet at a particular index. - class InsertDimensionRequest - include Google::Apis::Core::Hashable - - # Whether dimension properties should be extended from the dimensions - # before or after the newly inserted dimensions. - # True to inherit from the dimensions before (in which case the start - # index must be greater than 0), and false to inherit from the dimensions - # after. - # For example, if row index 0 has red background and row index 1 - # has a green background, then inserting 2 rows at index 1 can inherit - # either the green or red background. If `inheritFromBefore` is true, - # the two new rows will be red (because the row before the insertion point - # was red), whereas if `inheritFromBefore` is false, the two new rows will - # be green (because the row after the insertion point was green). - # Corresponds to the JSON property `inheritFromBefore` - # @return [Boolean] - attr_accessor :inherit_from_before - alias_method :inherit_from_before?, :inherit_from_before - - # A range along a single dimension on a sheet. - # All indexes are zero-based. - # Indexes are half open: the start index is inclusive - # and the end index is exclusive. - # Missing indexes indicate the range is unbounded on that side. - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV4::DimensionRange] - attr_accessor :range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @inherit_from_before = args[:inherit_from_before] if args.key?(:inherit_from_before) - @range = args[:range] if args.key?(:range) - end - end - - # Deletes the embedded object with the given ID. - class DeleteEmbeddedObjectRequest - include Google::Apis::Core::Hashable - - # The ID of the embedded object to delete. - # Corresponds to the JSON property `objectId` - # @return [Fixnum] - attr_accessor :object_id_prop - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) - end - end - - # A banded (alternating colors) range in a sheet. - class BandedRange - include Google::Apis::Core::Hashable - - # The id of the banded range. - # Corresponds to the JSON property `bandedRangeId` - # @return [Fixnum] - attr_accessor :banded_range_id - - # Properties referring a single dimension (either row or column). If both - # BandedRange.row_properties and BandedRange.column_properties are - # set, the fill colors are applied to cells according to the following rules: - # * header_color and footer_color take priority over band colors. - # * first_band_color takes priority over second_band_color. - # * row_properties takes priority over column_properties. - # For example, the first row color takes priority over the first column - # color, but the first column color takes priority over the second row color. - # Similarly, the row header takes priority over the column header in the - # top left cell, but the column header takes priority over the first row - # color if the row header is not set. - # Corresponds to the JSON property `rowProperties` - # @return [Google::Apis::SheetsV4::BandingProperties] - attr_accessor :row_properties - - # Properties referring a single dimension (either row or column). If both - # BandedRange.row_properties and BandedRange.column_properties are - # set, the fill colors are applied to cells according to the following rules: - # * header_color and footer_color take priority over band colors. - # * first_band_color takes priority over second_band_color. - # * row_properties takes priority over column_properties. - # For example, the first row color takes priority over the first column - # color, but the first column color takes priority over the second row color. - # Similarly, the row header takes priority over the column header in the - # top left cell, but the column header takes priority over the first row - # color if the row header is not set. - # Corresponds to the JSON property `columnProperties` - # @return [Google::Apis::SheetsV4::BandingProperties] - attr_accessor :column_properties - - # A range on a sheet. - # All indexes are zero-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if `"Sheet1"` is sheet ID 0, then: - # `Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1` - # `Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1 == sheet_id:0` - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as `#REF!`. - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV4::GridRange] - attr_accessor :range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @banded_range_id = args[:banded_range_id] if args.key?(:banded_range_id) - @row_properties = args[:row_properties] if args.key?(:row_properties) - @column_properties = args[:column_properties] if args.key?(:column_properties) - @range = args[:range] if args.key?(:range) - end - end - - # The result of deleting a conditional format rule. - class DeleteConditionalFormatRuleResponse - include Google::Apis::Core::Hashable - - # A rule describing a conditional format. - # Corresponds to the JSON property `rule` - # @return [Google::Apis::SheetsV4::ConditionalFormatRule] - attr_accessor :rule - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @rule = args[:rule] if args.key?(:rule) + @criteria = args[:criteria] if args.key?(:criteria) + @sort_specs = args[:sort_specs] if args.key?(:sort_specs) end end end diff --git a/generated/google/apis/sheets_v4/representations.rb b/generated/google/apis/sheets_v4/representations.rb index 5f39c7580..506f38ec5 100644 --- a/generated/google/apis/sheets_v4/representations.rb +++ b/generated/google/apis/sheets_v4/representations.rb @@ -22,697 +22,43 @@ module Google module Apis module SheetsV4 - class AddNamedRangeResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UpdateProtectedRangeRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Padding - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class MergeCellsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AddSheetResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class PivotGroupValueMetadata - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UpdateEmbeddedObjectPositionResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ClearValuesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UpdateConditionalFormatRuleRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class TextFormat - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UpdateChartSpecRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class GridCoordinate - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DeleteFilterViewRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BatchUpdateValuesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UpdateNamedRangeRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class UpdateValuesResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class SpreadsheetProperties - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CellData - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UnmergeCellsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class TextToColumnsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AddProtectedRangeResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BooleanCondition - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DeleteProtectedRangeRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BasicChartDomain - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DimensionRange - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Response - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AddConditionalFormatRuleRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class FilterView - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SortRangeRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AddBandingResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class TextFormatRun - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UpdateFilterViewRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UpdateConditionalFormatRuleResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class FilterCriteria - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DeleteDimensionRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class PivotTable - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DataValidationRule - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UpdateSpreadsheetPropertiesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ChartSourceRange - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BatchUpdateValuesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ClearBasicFilterRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BatchClearValuesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ConditionalFormatRule - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UpdateBordersRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class PivotFilterCriteria - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Borders - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class EmbeddedChart - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Color - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AddSheetRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AddProtectedRangeRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ValueRange - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class FindReplaceResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AppendValuesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CellFormat - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class MoveDimensionRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BasicChartAxis - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class PivotGroupSortValueBucket - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DimensionProperties - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class EmbeddedObjectPosition - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class InterpolationPoint - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ErrorValue - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DuplicateFilterViewRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BatchUpdateSpreadsheetRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SheetProperties - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ClearValuesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ProtectedRange - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DeleteConditionalFormatRuleRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DeleteRangeRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class InsertRangeRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ChartSpec - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SourceAndDestination - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ConditionValue - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class PasteDataRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class FindReplaceRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SortSpec - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CopySheetToAnotherSpreadsheetRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class NumberFormat - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BatchClearValuesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UpdateDimensionPropertiesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Editors - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Spreadsheet - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class GridData - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class PivotValue class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class DeleteBandingRequest + class ErrorValue class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class BasicFilter + class CopySheetToAnotherSpreadsheetRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class DuplicateSheetRequest + class PivotGroupSortValueBucket class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class AddFilterViewResponse + class EmbeddedObjectPosition class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class DuplicateSheetResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Border - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AddNamedRangeRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AddChartResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AddBandingRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AppendCellsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class RowData - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BasicChartSeries - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class NamedRange - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class RepeatCellRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BasicChartSpec - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UpdateEmbeddedObjectPositionRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SetBasicFilterRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AutoResizeDimensionsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DuplicateFilterViewResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BandingProperties - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class PivotGroup - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class GridRange - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DeleteSheetRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UpdateBandingRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ChartData - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Sheet - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CopyPasteRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UpdateCellsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ExtendedValue - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BatchUpdateSpreadsheetResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class GradientRule - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CutPasteRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class OverlayPosition + class DeleteProtectedRangeRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -724,73 +70,31 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class PieChartSpec + class GradientRule class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class UpdateSheetPropertiesRequest + class SetBasicFilterRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class BooleanRule + class ClearValuesRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class AppendDimensionRequest + class InterpolationPoint class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class AddFilterViewRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class GridProperties - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DeleteNamedRangeRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AddChartRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SetDataValidationRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Request - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BatchGetValuesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class InsertDimensionRequest + class FindReplaceResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -802,242 +106,771 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class DeleteSheetRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DuplicateFilterViewRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class UpdateConditionalFormatRuleResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ConditionValue + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DuplicateSheetRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ExtendedValue + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AddChartRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Spreadsheet + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class BatchClearValuesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class BandedRange class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class UpdateProtectedRangeRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TextFormat + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AddSheetResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AddFilterViewResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SpreadsheetProperties + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class OverlayPosition + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class RepeatCellRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AddChartResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class InsertDimensionRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class UpdateSpreadsheetPropertiesRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class BatchUpdateValuesRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ProtectedRange + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DimensionProperties + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DimensionRange + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class NamedRange + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CutPasteRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class BasicChartSeries + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Borders + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AutoResizeDimensionsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class UpdateBordersRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CellFormat + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ClearValuesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DeleteConditionalFormatRuleRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DeleteNamedRangeRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AddBandingResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ChartData + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class BatchGetValuesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class UpdateBandingRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Color + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class PivotGroup + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class PivotTable + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ChartSourceRange + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AppendCellsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ValueRange + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AddBandingRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Response + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class InsertRangeRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class EmbeddedChart + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TextFormatRun + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AddNamedRangeResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class RowData + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GridData + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Border + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class UpdateNamedRangeRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class FindReplaceRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AddSheetRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class UpdateCellsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class DeleteConditionalFormatRuleResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class AddNamedRangeResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :named_range, as: 'namedRange', class: Google::Apis::SheetsV4::NamedRange, decorator: Google::Apis::SheetsV4::NamedRange::Representation + class DeleteRangeRequest + class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class UpdateProtectedRangeRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :protected_range, as: 'protectedRange', class: Google::Apis::SheetsV4::ProtectedRange, decorator: Google::Apis::SheetsV4::ProtectedRange::Representation - - property :fields, as: 'fields' - end - end - - class Padding - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :right, as: 'right' - property :left, as: 'left' - property :top, as: 'top' - property :bottom, as: 'bottom' - end - end - - class MergeCellsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :merge_type, as: 'mergeType' - property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - - end - end - - class AddSheetResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :properties, as: 'properties', class: Google::Apis::SheetsV4::SheetProperties, decorator: Google::Apis::SheetsV4::SheetProperties::Representation - - end - end - - class PivotGroupValueMetadata - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :value, as: 'value', class: Google::Apis::SheetsV4::ExtendedValue, decorator: Google::Apis::SheetsV4::ExtendedValue::Representation - - property :collapsed, as: 'collapsed' - end - end - - class UpdateEmbeddedObjectPositionResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :position, as: 'position', class: Google::Apis::SheetsV4::EmbeddedObjectPosition, decorator: Google::Apis::SheetsV4::EmbeddedObjectPosition::Representation - - end - end - - class ClearValuesResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :spreadsheet_id, as: 'spreadsheetId' - property :cleared_range, as: 'clearedRange' - end - end - - class UpdateConditionalFormatRuleRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :sheet_id, as: 'sheetId' - property :rule, as: 'rule', class: Google::Apis::SheetsV4::ConditionalFormatRule, decorator: Google::Apis::SheetsV4::ConditionalFormatRule::Representation - - property :index, as: 'index' - property :new_index, as: 'newIndex' - end - end - - class TextFormat - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :bold, as: 'bold' - property :italic, as: 'italic' - property :foreground_color, as: 'foregroundColor', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation - - property :font_family, as: 'fontFamily' - property :strikethrough, as: 'strikethrough' - property :font_size, as: 'fontSize' - property :underline, as: 'underline' - end - end - - class UpdateChartSpecRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :chart_id, as: 'chartId' - property :spec, as: 'spec', class: Google::Apis::SheetsV4::ChartSpec, decorator: Google::Apis::SheetsV4::ChartSpec::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class GridCoordinate - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :sheet_id, as: 'sheetId' - property :row_index, as: 'rowIndex' - property :column_index, as: 'columnIndex' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class UpdateSheetPropertiesRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class UnmergeCellsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GridProperties + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class UpdateEmbeddedObjectPositionResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SortSpec + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Sheet + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class BooleanRule + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class FilterCriteria + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class PivotGroupValueMetadata + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Editors + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class UpdateConditionalFormatRuleRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DataValidationRule + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class BasicChartDomain + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class PasteDataRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AppendDimensionRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AddNamedRangeRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class UpdateEmbeddedObjectPositionRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class PieChartSpec + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class UpdateFilterViewRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ConditionalFormatRule + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CopyPasteRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Request + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class BooleanCondition + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GridRange + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class BasicChartSpec + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SetDataValidationRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CellData + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class BatchUpdateSpreadsheetRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class BasicChartAxis + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Padding + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DeleteDimensionRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class UpdateChartSpecRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class DeleteFilterViewRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :filter_id, as: 'filterId' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class BatchUpdateValuesResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :total_updated_sheets, as: 'totalUpdatedSheets' - property :total_updated_columns, as: 'totalUpdatedColumns' - collection :responses, as: 'responses', class: Google::Apis::SheetsV4::UpdateValuesResponse, decorator: Google::Apis::SheetsV4::UpdateValuesResponse::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :total_updated_cells, as: 'totalUpdatedCells' - property :spreadsheet_id, as: 'spreadsheetId' - property :total_updated_rows, as: 'totalUpdatedRows' - end + include Google::Apis::Core::JsonObjectSupport end - class UpdateNamedRangeRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :fields, as: 'fields' - property :named_range, as: 'namedRange', class: Google::Apis::SheetsV4::NamedRange, decorator: Google::Apis::SheetsV4::NamedRange::Representation + class SortRangeRequest + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport + end + + class MergeCellsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AddProtectedRangeRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class BatchClearValuesRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DuplicateFilterViewResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DuplicateSheetResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TextToColumnsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ClearBasicFilterRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class BatchUpdateSpreadsheetResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DeleteBandingRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AppendValuesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class MoveDimensionRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class PivotFilterCriteria + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AddFilterViewRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AddConditionalFormatRuleRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ChartSpec + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class NumberFormat + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SheetProperties + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class UpdateDimensionPropertiesRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SourceAndDestination + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class FilterView + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class BandingProperties + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AddProtectedRangeResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class BasicFilter + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class UpdateValuesResponse # @private class Representation < Google::Apis::Core::JsonRepresentation - property :updated_columns, as: 'updatedColumns' - property :updated_cells, as: 'updatedCells' property :updated_data, as: 'updatedData', class: Google::Apis::SheetsV4::ValueRange, decorator: Google::Apis::SheetsV4::ValueRange::Representation - property :updated_range, as: 'updatedRange' - property :spreadsheet_id, as: 'spreadsheetId' property :updated_rows, as: 'updatedRows' + property :updated_columns, as: 'updatedColumns' + property :spreadsheet_id, as: 'spreadsheetId' + property :updated_range, as: 'updatedRange' + property :updated_cells, as: 'updatedCells' end end - class SpreadsheetProperties + class PivotValue # @private class Representation < Google::Apis::Core::JsonRepresentation - property :time_zone, as: 'timeZone' - property :auto_recalc, as: 'autoRecalc' - property :locale, as: 'locale' - property :title, as: 'title' - property :default_format, as: 'defaultFormat', class: Google::Apis::SheetsV4::CellFormat, decorator: Google::Apis::SheetsV4::CellFormat::Representation - + property :source_column_offset, as: 'sourceColumnOffset' + property :name, as: 'name' + property :formula, as: 'formula' + property :summarize_function, as: 'summarizeFunction' end end - class CellData + class ErrorValue # @private class Representation < Google::Apis::Core::JsonRepresentation - property :hyperlink, as: 'hyperlink' - property :effective_format, as: 'effectiveFormat', class: Google::Apis::SheetsV4::CellFormat, decorator: Google::Apis::SheetsV4::CellFormat::Representation - - property :note, as: 'note' - property :formatted_value, as: 'formattedValue' - property :user_entered_value, as: 'userEnteredValue', class: Google::Apis::SheetsV4::ExtendedValue, decorator: Google::Apis::SheetsV4::ExtendedValue::Representation - - property :data_validation, as: 'dataValidation', class: Google::Apis::SheetsV4::DataValidationRule, decorator: Google::Apis::SheetsV4::DataValidationRule::Representation - - property :user_entered_format, as: 'userEnteredFormat', class: Google::Apis::SheetsV4::CellFormat, decorator: Google::Apis::SheetsV4::CellFormat::Representation - - property :pivot_table, as: 'pivotTable', class: Google::Apis::SheetsV4::PivotTable, decorator: Google::Apis::SheetsV4::PivotTable::Representation - - collection :text_format_runs, as: 'textFormatRuns', class: Google::Apis::SheetsV4::TextFormatRun, decorator: Google::Apis::SheetsV4::TextFormatRun::Representation - - property :effective_value, as: 'effectiveValue', class: Google::Apis::SheetsV4::ExtendedValue, decorator: Google::Apis::SheetsV4::ExtendedValue::Representation - - end - end - - class UnmergeCellsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - - end - end - - class TextToColumnsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :source, as: 'source', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - - property :delimiter, as: 'delimiter' - property :delimiter_type, as: 'delimiterType' - end - end - - class AddProtectedRangeResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :protected_range, as: 'protectedRange', class: Google::Apis::SheetsV4::ProtectedRange, decorator: Google::Apis::SheetsV4::ProtectedRange::Representation - - end - end - - class BooleanCondition - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :values, as: 'values', class: Google::Apis::SheetsV4::ConditionValue, decorator: Google::Apis::SheetsV4::ConditionValue::Representation - + property :message, as: 'message' property :type, as: 'type' end end + class CopySheetToAnotherSpreadsheetRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :destination_spreadsheet_id, as: 'destinationSpreadsheetId' + end + end + + class PivotGroupSortValueBucket + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :buckets, as: 'buckets', class: Google::Apis::SheetsV4::ExtendedValue, decorator: Google::Apis::SheetsV4::ExtendedValue::Representation + + property :values_index, as: 'valuesIndex' + end + end + + class EmbeddedObjectPosition + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :new_sheet, as: 'newSheet' + property :sheet_id, as: 'sheetId' + property :overlay_position, as: 'overlayPosition', class: Google::Apis::SheetsV4::OverlayPosition, decorator: Google::Apis::SheetsV4::OverlayPosition::Representation + + end + end + class DeleteProtectedRangeRequest # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1045,111 +878,82 @@ module Google end end - class BasicChartDomain + class AutoFillRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - property :domain, as: 'domain', class: Google::Apis::SheetsV4::ChartData, decorator: Google::Apis::SheetsV4::ChartData::Representation + property :use_alternate_series, as: 'useAlternateSeries' + property :source_and_destination, as: 'sourceAndDestination', class: Google::Apis::SheetsV4::SourceAndDestination, decorator: Google::Apis::SheetsV4::SourceAndDestination::Representation + + property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation end end - class DimensionRange + class GradientRule + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :minpoint, as: 'minpoint', class: Google::Apis::SheetsV4::InterpolationPoint, decorator: Google::Apis::SheetsV4::InterpolationPoint::Representation + + property :maxpoint, as: 'maxpoint', class: Google::Apis::SheetsV4::InterpolationPoint, decorator: Google::Apis::SheetsV4::InterpolationPoint::Representation + + property :midpoint, as: 'midpoint', class: Google::Apis::SheetsV4::InterpolationPoint, decorator: Google::Apis::SheetsV4::InterpolationPoint::Representation + + end + end + + class SetBasicFilterRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :filter, as: 'filter', class: Google::Apis::SheetsV4::BasicFilter, decorator: Google::Apis::SheetsV4::BasicFilter::Representation + + end + end + + class ClearValuesRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class InterpolationPoint + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :color, as: 'color', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation + + property :type, as: 'type' + property :value, as: 'value' + end + end + + class FindReplaceResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :values_changed, as: 'valuesChanged' + property :occurrences_changed, as: 'occurrencesChanged' + property :rows_changed, as: 'rowsChanged' + property :sheets_changed, as: 'sheetsChanged' + property :formulas_changed, as: 'formulasChanged' + end + end + + class DeleteEmbeddedObjectRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :object_id_prop, as: 'objectId' + end + end + + class DeleteSheetRequest # @private class Representation < Google::Apis::Core::JsonRepresentation property :sheet_id, as: 'sheetId' - property :end_index, as: 'endIndex' - property :start_index, as: 'startIndex' - property :dimension, as: 'dimension' end end - class Response + class DuplicateFilterViewRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - property :update_embedded_object_position, as: 'updateEmbeddedObjectPosition', class: Google::Apis::SheetsV4::UpdateEmbeddedObjectPositionResponse, decorator: Google::Apis::SheetsV4::UpdateEmbeddedObjectPositionResponse::Representation - - property :add_filter_view, as: 'addFilterView', class: Google::Apis::SheetsV4::AddFilterViewResponse, decorator: Google::Apis::SheetsV4::AddFilterViewResponse::Representation - - property :add_sheet, as: 'addSheet', class: Google::Apis::SheetsV4::AddSheetResponse, decorator: Google::Apis::SheetsV4::AddSheetResponse::Representation - - property :find_replace, as: 'findReplace', class: Google::Apis::SheetsV4::FindReplaceResponse, decorator: Google::Apis::SheetsV4::FindReplaceResponse::Representation - - property :add_protected_range, as: 'addProtectedRange', class: Google::Apis::SheetsV4::AddProtectedRangeResponse, decorator: Google::Apis::SheetsV4::AddProtectedRangeResponse::Representation - - property :update_conditional_format_rule, as: 'updateConditionalFormatRule', class: Google::Apis::SheetsV4::UpdateConditionalFormatRuleResponse, decorator: Google::Apis::SheetsV4::UpdateConditionalFormatRuleResponse::Representation - - property :add_chart, as: 'addChart', class: Google::Apis::SheetsV4::AddChartResponse, decorator: Google::Apis::SheetsV4::AddChartResponse::Representation - - property :delete_conditional_format_rule, as: 'deleteConditionalFormatRule', class: Google::Apis::SheetsV4::DeleteConditionalFormatRuleResponse, decorator: Google::Apis::SheetsV4::DeleteConditionalFormatRuleResponse::Representation - - property :add_banding, as: 'addBanding', class: Google::Apis::SheetsV4::AddBandingResponse, decorator: Google::Apis::SheetsV4::AddBandingResponse::Representation - - property :duplicate_sheet, as: 'duplicateSheet', class: Google::Apis::SheetsV4::DuplicateSheetResponse, decorator: Google::Apis::SheetsV4::DuplicateSheetResponse::Representation - - property :duplicate_filter_view, as: 'duplicateFilterView', class: Google::Apis::SheetsV4::DuplicateFilterViewResponse, decorator: Google::Apis::SheetsV4::DuplicateFilterViewResponse::Representation - - property :add_named_range, as: 'addNamedRange', class: Google::Apis::SheetsV4::AddNamedRangeResponse, decorator: Google::Apis::SheetsV4::AddNamedRangeResponse::Representation - - end - end - - class AddConditionalFormatRuleRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :rule, as: 'rule', class: Google::Apis::SheetsV4::ConditionalFormatRule, decorator: Google::Apis::SheetsV4::ConditionalFormatRule::Representation - - property :index, as: 'index' - end - end - - class FilterView - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :title, as: 'title' - property :named_range_id, as: 'namedRangeId' - collection :sort_specs, as: 'sortSpecs', class: Google::Apis::SheetsV4::SortSpec, decorator: Google::Apis::SheetsV4::SortSpec::Representation - - property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - - hash :criteria, as: 'criteria', class: Google::Apis::SheetsV4::FilterCriteria, decorator: Google::Apis::SheetsV4::FilterCriteria::Representation - - property :filter_view_id, as: 'filterViewId' - end - end - - class SortRangeRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - - collection :sort_specs, as: 'sortSpecs', class: Google::Apis::SheetsV4::SortSpec, decorator: Google::Apis::SheetsV4::SortSpec::Representation - - end - end - - class AddBandingResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :banded_range, as: 'bandedRange', class: Google::Apis::SheetsV4::BandedRange, decorator: Google::Apis::SheetsV4::BandedRange::Representation - - end - end - - class TextFormatRun - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :start_index, as: 'startIndex' - property :format, as: 'format', class: Google::Apis::SheetsV4::TextFormat, decorator: Google::Apis::SheetsV4::TextFormat::Representation - - end - end - - class UpdateFilterViewRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :filter, as: 'filter', class: Google::Apis::SheetsV4::FilterView, decorator: Google::Apis::SheetsV4::FilterView::Representation - - property :fields, as: 'fields' + property :filter_id, as: 'filterId' end end @@ -1165,51 +969,170 @@ module Google end end - class FilterCriteria + class ConditionValue # @private class Representation < Google::Apis::Core::JsonRepresentation - property :condition, as: 'condition', class: Google::Apis::SheetsV4::BooleanCondition, decorator: Google::Apis::SheetsV4::BooleanCondition::Representation - - collection :hidden_values, as: 'hiddenValues' + property :relative_date, as: 'relativeDate' + property :user_entered_value, as: 'userEnteredValue' end end - class DeleteDimensionRequest + class DuplicateSheetRequest # @private class Representation < Google::Apis::Core::JsonRepresentation + property :new_sheet_name, as: 'newSheetName' + property :source_sheet_id, as: 'sourceSheetId' + property :new_sheet_id, as: 'newSheetId' + property :insert_sheet_index, as: 'insertSheetIndex' + end + end + + class ExtendedValue + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :error_value, as: 'errorValue', class: Google::Apis::SheetsV4::ErrorValue, decorator: Google::Apis::SheetsV4::ErrorValue::Representation + + property :string_value, as: 'stringValue' + property :bool_value, as: 'boolValue' + property :formula_value, as: 'formulaValue' + property :number_value, as: 'numberValue' + end + end + + class AddChartRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :chart, as: 'chart', class: Google::Apis::SheetsV4::EmbeddedChart, decorator: Google::Apis::SheetsV4::EmbeddedChart::Representation + + end + end + + class Spreadsheet + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :properties, as: 'properties', class: Google::Apis::SheetsV4::SpreadsheetProperties, decorator: Google::Apis::SheetsV4::SpreadsheetProperties::Representation + + property :spreadsheet_id, as: 'spreadsheetId' + collection :sheets, as: 'sheets', class: Google::Apis::SheetsV4::Sheet, decorator: Google::Apis::SheetsV4::Sheet::Representation + + collection :named_ranges, as: 'namedRanges', class: Google::Apis::SheetsV4::NamedRange, decorator: Google::Apis::SheetsV4::NamedRange::Representation + + property :spreadsheet_url, as: 'spreadsheetUrl' + end + end + + class BatchClearValuesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :cleared_ranges, as: 'clearedRanges' + property :spreadsheet_id, as: 'spreadsheetId' + end + end + + class BandedRange + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + property :banded_range_id, as: 'bandedRangeId' + property :row_properties, as: 'rowProperties', class: Google::Apis::SheetsV4::BandingProperties, decorator: Google::Apis::SheetsV4::BandingProperties::Representation + + property :column_properties, as: 'columnProperties', class: Google::Apis::SheetsV4::BandingProperties, decorator: Google::Apis::SheetsV4::BandingProperties::Representation + + end + end + + class UpdateProtectedRangeRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :protected_range, as: 'protectedRange', class: Google::Apis::SheetsV4::ProtectedRange, decorator: Google::Apis::SheetsV4::ProtectedRange::Representation + + property :fields, as: 'fields' + end + end + + class TextFormat + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :font_family, as: 'fontFamily' + property :strikethrough, as: 'strikethrough' + property :italic, as: 'italic' + property :font_size, as: 'fontSize' + property :underline, as: 'underline' + property :bold, as: 'bold' + property :foreground_color, as: 'foregroundColor', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation + + end + end + + class AddSheetResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :properties, as: 'properties', class: Google::Apis::SheetsV4::SheetProperties, decorator: Google::Apis::SheetsV4::SheetProperties::Representation + + end + end + + class AddFilterViewResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :filter, as: 'filter', class: Google::Apis::SheetsV4::FilterView, decorator: Google::Apis::SheetsV4::FilterView::Representation + + end + end + + class SpreadsheetProperties + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :locale, as: 'locale' + property :auto_recalc, as: 'autoRecalc' + property :default_format, as: 'defaultFormat', class: Google::Apis::SheetsV4::CellFormat, decorator: Google::Apis::SheetsV4::CellFormat::Representation + + property :title, as: 'title' + property :time_zone, as: 'timeZone' + end + end + + class OverlayPosition + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :width_pixels, as: 'widthPixels' + property :offset_x_pixels, as: 'offsetXPixels' + property :anchor_cell, as: 'anchorCell', class: Google::Apis::SheetsV4::GridCoordinate, decorator: Google::Apis::SheetsV4::GridCoordinate::Representation + + property :offset_y_pixels, as: 'offsetYPixels' + property :height_pixels, as: 'heightPixels' + end + end + + class RepeatCellRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + property :fields, as: 'fields' + property :cell, as: 'cell', class: Google::Apis::SheetsV4::CellData, decorator: Google::Apis::SheetsV4::CellData::Representation + + end + end + + class AddChartResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :chart, as: 'chart', class: Google::Apis::SheetsV4::EmbeddedChart, decorator: Google::Apis::SheetsV4::EmbeddedChart::Representation + + end + end + + class InsertDimensionRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :inherit_from_before, as: 'inheritFromBefore' property :range, as: 'range', class: Google::Apis::SheetsV4::DimensionRange, decorator: Google::Apis::SheetsV4::DimensionRange::Representation end end - class PivotTable - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :value_layout, as: 'valueLayout' - collection :columns, as: 'columns', class: Google::Apis::SheetsV4::PivotGroup, decorator: Google::Apis::SheetsV4::PivotGroup::Representation - - property :source, as: 'source', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - - collection :rows, as: 'rows', class: Google::Apis::SheetsV4::PivotGroup, decorator: Google::Apis::SheetsV4::PivotGroup::Representation - - collection :values, as: 'values', class: Google::Apis::SheetsV4::PivotValue, decorator: Google::Apis::SheetsV4::PivotValue::Representation - - hash :criteria, as: 'criteria', class: Google::Apis::SheetsV4::PivotFilterCriteria, decorator: Google::Apis::SheetsV4::PivotFilterCriteria::Representation - - end - end - - class DataValidationRule - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :condition, as: 'condition', class: Google::Apis::SheetsV4::BooleanCondition, decorator: Google::Apis::SheetsV4::BooleanCondition::Representation - - property :input_message, as: 'inputMessage' - property :show_custom_ui, as: 'showCustomUi' - property :strict, as: 'strict' - end - end - class UpdateSpreadsheetPropertiesRequest # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1219,6 +1142,245 @@ module Google end end + class BatchUpdateValuesRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :value_input_option, as: 'valueInputOption' + collection :data, as: 'data', class: Google::Apis::SheetsV4::ValueRange, decorator: Google::Apis::SheetsV4::ValueRange::Representation + + property :response_date_time_render_option, as: 'responseDateTimeRenderOption' + property :response_value_render_option, as: 'responseValueRenderOption' + property :include_values_in_response, as: 'includeValuesInResponse' + end + end + + class ProtectedRange + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :requesting_user_can_edit, as: 'requestingUserCanEdit' + property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + property :editors, as: 'editors', class: Google::Apis::SheetsV4::Editors, decorator: Google::Apis::SheetsV4::Editors::Representation + + property :description, as: 'description' + collection :unprotected_ranges, as: 'unprotectedRanges', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + property :named_range_id, as: 'namedRangeId' + property :protected_range_id, as: 'protectedRangeId' + property :warning_only, as: 'warningOnly' + end + end + + class DimensionProperties + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :pixel_size, as: 'pixelSize' + property :hidden_by_filter, as: 'hiddenByFilter' + property :hidden_by_user, as: 'hiddenByUser' + end + end + + class DimensionRange + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :sheet_id, as: 'sheetId' + property :dimension, as: 'dimension' + property :start_index, as: 'startIndex' + property :end_index, as: 'endIndex' + end + end + + class NamedRange + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :name, as: 'name' + property :named_range_id, as: 'namedRangeId' + property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + end + end + + class CutPasteRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :destination, as: 'destination', class: Google::Apis::SheetsV4::GridCoordinate, decorator: Google::Apis::SheetsV4::GridCoordinate::Representation + + property :source, as: 'source', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + property :paste_type, as: 'pasteType' + end + end + + class BasicChartSeries + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :series, as: 'series', class: Google::Apis::SheetsV4::ChartData, decorator: Google::Apis::SheetsV4::ChartData::Representation + + property :type, as: 'type' + property :target_axis, as: 'targetAxis' + end + end + + class Borders + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :right, as: 'right', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation + + property :bottom, as: 'bottom', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation + + property :top, as: 'top', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation + + property :left, as: 'left', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation + + end + end + + class AutoResizeDimensionsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :dimensions, as: 'dimensions', class: Google::Apis::SheetsV4::DimensionRange, decorator: Google::Apis::SheetsV4::DimensionRange::Representation + + end + end + + class UpdateBordersRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :bottom, as: 'bottom', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation + + property :inner_vertical, as: 'innerVertical', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation + + property :right, as: 'right', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation + + property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + property :inner_horizontal, as: 'innerHorizontal', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation + + property :top, as: 'top', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation + + property :left, as: 'left', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation + + end + end + + class CellFormat + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :vertical_alignment, as: 'verticalAlignment' + property :padding, as: 'padding', class: Google::Apis::SheetsV4::Padding, decorator: Google::Apis::SheetsV4::Padding::Representation + + property :borders, as: 'borders', class: Google::Apis::SheetsV4::Borders, decorator: Google::Apis::SheetsV4::Borders::Representation + + property :text_direction, as: 'textDirection' + property :wrap_strategy, as: 'wrapStrategy' + property :number_format, as: 'numberFormat', class: Google::Apis::SheetsV4::NumberFormat, decorator: Google::Apis::SheetsV4::NumberFormat::Representation + + property :horizontal_alignment, as: 'horizontalAlignment' + property :hyperlink_display_type, as: 'hyperlinkDisplayType' + property :text_format, as: 'textFormat', class: Google::Apis::SheetsV4::TextFormat, decorator: Google::Apis::SheetsV4::TextFormat::Representation + + property :background_color, as: 'backgroundColor', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation + + end + end + + class ClearValuesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :spreadsheet_id, as: 'spreadsheetId' + property :cleared_range, as: 'clearedRange' + end + end + + class DeleteConditionalFormatRuleRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :index, as: 'index' + property :sheet_id, as: 'sheetId' + end + end + + class DeleteNamedRangeRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :named_range_id, as: 'namedRangeId' + end + end + + class AddBandingResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :banded_range, as: 'bandedRange', class: Google::Apis::SheetsV4::BandedRange, decorator: Google::Apis::SheetsV4::BandedRange::Representation + + end + end + + class ChartData + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :source_range, as: 'sourceRange', class: Google::Apis::SheetsV4::ChartSourceRange, decorator: Google::Apis::SheetsV4::ChartSourceRange::Representation + + end + end + + class BatchGetValuesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :spreadsheet_id, as: 'spreadsheetId' + collection :value_ranges, as: 'valueRanges', class: Google::Apis::SheetsV4::ValueRange, decorator: Google::Apis::SheetsV4::ValueRange::Representation + + end + end + + class UpdateBandingRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :fields, as: 'fields' + property :banded_range, as: 'bandedRange', class: Google::Apis::SheetsV4::BandedRange, decorator: Google::Apis::SheetsV4::BandedRange::Representation + + end + end + + class Color + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :red, as: 'red' + property :green, as: 'green' + property :blue, as: 'blue' + property :alpha, as: 'alpha' + end + end + + class PivotGroup + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :sort_order, as: 'sortOrder' + property :value_bucket, as: 'valueBucket', class: Google::Apis::SheetsV4::PivotGroupSortValueBucket, decorator: Google::Apis::SheetsV4::PivotGroupSortValueBucket::Representation + + property :source_column_offset, as: 'sourceColumnOffset' + property :show_totals, as: 'showTotals' + collection :value_metadata, as: 'valueMetadata', class: Google::Apis::SheetsV4::PivotGroupValueMetadata, decorator: Google::Apis::SheetsV4::PivotGroupValueMetadata::Representation + + end + end + + class PivotTable + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :rows, as: 'rows', class: Google::Apis::SheetsV4::PivotGroup, decorator: Google::Apis::SheetsV4::PivotGroup::Representation + + property :value_layout, as: 'valueLayout' + collection :columns, as: 'columns', class: Google::Apis::SheetsV4::PivotGroup, decorator: Google::Apis::SheetsV4::PivotGroup::Representation + + collection :values, as: 'values', class: Google::Apis::SheetsV4::PivotValue, decorator: Google::Apis::SheetsV4::PivotValue::Representation + + property :source, as: 'source', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + hash :criteria, as: 'criteria', class: Google::Apis::SheetsV4::PivotFilterCriteria, decorator: Google::Apis::SheetsV4::PivotFilterCriteria::Representation + + end + end + class ChartSourceRange # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1227,83 +1389,73 @@ module Google end end - class BatchUpdateValuesRequest + class AppendCellsRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - property :value_input_option, as: 'valueInputOption' - collection :data, as: 'data', class: Google::Apis::SheetsV4::ValueRange, decorator: Google::Apis::SheetsV4::ValueRange::Representation + collection :rows, as: 'rows', class: Google::Apis::SheetsV4::RowData, decorator: Google::Apis::SheetsV4::RowData::Representation - property :response_value_render_option, as: 'responseValueRenderOption' - property :response_date_time_render_option, as: 'responseDateTimeRenderOption' - property :include_values_in_response, as: 'includeValuesInResponse' - end - end - - class ClearBasicFilterRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation + property :fields, as: 'fields' property :sheet_id, as: 'sheetId' end end - class BatchClearValuesResponse + class ValueRange # @private class Representation < Google::Apis::Core::JsonRepresentation - property :spreadsheet_id, as: 'spreadsheetId' - collection :cleared_ranges, as: 'clearedRanges' + property :major_dimension, as: 'majorDimension' + collection :values, as: 'values', :class => Array do + include Representable::JSON::Collection + items + end + + property :range, as: 'range' end end - class ConditionalFormatRule + class AddBandingRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - property :gradient_rule, as: 'gradientRule', class: Google::Apis::SheetsV4::GradientRule, decorator: Google::Apis::SheetsV4::GradientRule::Representation - - property :boolean_rule, as: 'booleanRule', class: Google::Apis::SheetsV4::BooleanRule, decorator: Google::Apis::SheetsV4::BooleanRule::Representation - - collection :ranges, as: 'ranges', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + property :banded_range, as: 'bandedRange', class: Google::Apis::SheetsV4::BandedRange, decorator: Google::Apis::SheetsV4::BandedRange::Representation end end - class UpdateBordersRequest + class Response # @private class Representation < Google::Apis::Core::JsonRepresentation - property :right, as: 'right', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation + property :add_filter_view, as: 'addFilterView', class: Google::Apis::SheetsV4::AddFilterViewResponse, decorator: Google::Apis::SheetsV4::AddFilterViewResponse::Representation - property :inner_vertical, as: 'innerVertical', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation + property :add_banding, as: 'addBanding', class: Google::Apis::SheetsV4::AddBandingResponse, decorator: Google::Apis::SheetsV4::AddBandingResponse::Representation - property :top, as: 'top', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation + property :add_protected_range, as: 'addProtectedRange', class: Google::Apis::SheetsV4::AddProtectedRangeResponse, decorator: Google::Apis::SheetsV4::AddProtectedRangeResponse::Representation - property :inner_horizontal, as: 'innerHorizontal', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation + property :duplicate_sheet, as: 'duplicateSheet', class: Google::Apis::SheetsV4::DuplicateSheetResponse, decorator: Google::Apis::SheetsV4::DuplicateSheetResponse::Representation + property :update_embedded_object_position, as: 'updateEmbeddedObjectPosition', class: Google::Apis::SheetsV4::UpdateEmbeddedObjectPositionResponse, decorator: Google::Apis::SheetsV4::UpdateEmbeddedObjectPositionResponse::Representation + + property :delete_conditional_format_rule, as: 'deleteConditionalFormatRule', class: Google::Apis::SheetsV4::DeleteConditionalFormatRuleResponse, decorator: Google::Apis::SheetsV4::DeleteConditionalFormatRuleResponse::Representation + + property :duplicate_filter_view, as: 'duplicateFilterView', class: Google::Apis::SheetsV4::DuplicateFilterViewResponse, decorator: Google::Apis::SheetsV4::DuplicateFilterViewResponse::Representation + + property :add_chart, as: 'addChart', class: Google::Apis::SheetsV4::AddChartResponse, decorator: Google::Apis::SheetsV4::AddChartResponse::Representation + + property :find_replace, as: 'findReplace', class: Google::Apis::SheetsV4::FindReplaceResponse, decorator: Google::Apis::SheetsV4::FindReplaceResponse::Representation + + property :add_sheet, as: 'addSheet', class: Google::Apis::SheetsV4::AddSheetResponse, decorator: Google::Apis::SheetsV4::AddSheetResponse::Representation + + property :update_conditional_format_rule, as: 'updateConditionalFormatRule', class: Google::Apis::SheetsV4::UpdateConditionalFormatRuleResponse, decorator: Google::Apis::SheetsV4::UpdateConditionalFormatRuleResponse::Representation + + property :add_named_range, as: 'addNamedRange', class: Google::Apis::SheetsV4::AddNamedRangeResponse, decorator: Google::Apis::SheetsV4::AddNamedRangeResponse::Representation + + end + end + + class InsertRangeRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :shift_dimension, as: 'shiftDimension' property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - property :bottom, as: 'bottom', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation - - property :left, as: 'left', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation - - end - end - - class PivotFilterCriteria - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :visible_values, as: 'visibleValues' - end - end - - class Borders - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :left, as: 'left', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation - - property :right, as: 'right', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation - - property :top, as: 'top', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation - - property :bottom, as: 'bottom', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation - end end @@ -1318,13 +1470,77 @@ module Google end end - class Color + class TextFormatRun # @private class Representation < Google::Apis::Core::JsonRepresentation - property :green, as: 'green' - property :blue, as: 'blue' - property :red, as: 'red' - property :alpha, as: 'alpha' + property :start_index, as: 'startIndex' + property :format, as: 'format', class: Google::Apis::SheetsV4::TextFormat, decorator: Google::Apis::SheetsV4::TextFormat::Representation + + end + end + + class AddNamedRangeResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :named_range, as: 'namedRange', class: Google::Apis::SheetsV4::NamedRange, decorator: Google::Apis::SheetsV4::NamedRange::Representation + + end + end + + class RowData + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :values, as: 'values', class: Google::Apis::SheetsV4::CellData, decorator: Google::Apis::SheetsV4::CellData::Representation + + end + end + + class GridData + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :row_data, as: 'rowData', class: Google::Apis::SheetsV4::RowData, decorator: Google::Apis::SheetsV4::RowData::Representation + + property :start_row, as: 'startRow' + collection :column_metadata, as: 'columnMetadata', class: Google::Apis::SheetsV4::DimensionProperties, decorator: Google::Apis::SheetsV4::DimensionProperties::Representation + + property :start_column, as: 'startColumn' + collection :row_metadata, as: 'rowMetadata', class: Google::Apis::SheetsV4::DimensionProperties, decorator: Google::Apis::SheetsV4::DimensionProperties::Representation + + end + end + + class Border + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :color, as: 'color', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation + + property :width, as: 'width' + property :style, as: 'style' + end + end + + class UpdateNamedRangeRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :named_range, as: 'namedRange', class: Google::Apis::SheetsV4::NamedRange, decorator: Google::Apis::SheetsV4::NamedRange::Representation + + property :fields, as: 'fields' + end + end + + class FindReplaceRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :match_entire_cell, as: 'matchEntireCell' + property :search_by_regex, as: 'searchByRegex' + property :find, as: 'find' + property :replacement, as: 'replacement' + property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + property :sheet_id, as: 'sheetId' + property :all_sheets, as: 'allSheets' + property :match_case, as: 'matchCase' + property :include_formulas, as: 'includeFormulas' end end @@ -1336,196 +1552,24 @@ module Google end end - class AddProtectedRangeRequest + class UpdateCellsRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - property :protected_range, as: 'protectedRange', class: Google::Apis::SheetsV4::ProtectedRange, decorator: Google::Apis::SheetsV4::ProtectedRange::Representation + collection :rows, as: 'rows', class: Google::Apis::SheetsV4::RowData, decorator: Google::Apis::SheetsV4::RowData::Representation - end - end + property :fields, as: 'fields' + property :start, as: 'start', class: Google::Apis::SheetsV4::GridCoordinate, decorator: Google::Apis::SheetsV4::GridCoordinate::Representation - class ValueRange - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :values, as: 'values', :class => Array do - include Representable::JSON::Collection - items - end - - property :range, as: 'range' - property :major_dimension, as: 'majorDimension' - end - end - - class FindReplaceResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :values_changed, as: 'valuesChanged' - property :rows_changed, as: 'rowsChanged' - property :occurrences_changed, as: 'occurrencesChanged' - property :formulas_changed, as: 'formulasChanged' - property :sheets_changed, as: 'sheetsChanged' - end - end - - class AppendValuesResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :spreadsheet_id, as: 'spreadsheetId' - property :table_range, as: 'tableRange' - property :updates, as: 'updates', class: Google::Apis::SheetsV4::UpdateValuesResponse, decorator: Google::Apis::SheetsV4::UpdateValuesResponse::Representation - - end - end - - class CellFormat - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :horizontal_alignment, as: 'horizontalAlignment' - property :hyperlink_display_type, as: 'hyperlinkDisplayType' - property :borders, as: 'borders', class: Google::Apis::SheetsV4::Borders, decorator: Google::Apis::SheetsV4::Borders::Representation - - property :text_direction, as: 'textDirection' - property :text_format, as: 'textFormat', class: Google::Apis::SheetsV4::TextFormat, decorator: Google::Apis::SheetsV4::TextFormat::Representation - - property :padding, as: 'padding', class: Google::Apis::SheetsV4::Padding, decorator: Google::Apis::SheetsV4::Padding::Representation - - property :number_format, as: 'numberFormat', class: Google::Apis::SheetsV4::NumberFormat, decorator: Google::Apis::SheetsV4::NumberFormat::Representation - - property :wrap_strategy, as: 'wrapStrategy' - property :background_color, as: 'backgroundColor', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation - - property :vertical_alignment, as: 'verticalAlignment' - end - end - - class MoveDimensionRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :source, as: 'source', class: Google::Apis::SheetsV4::DimensionRange, decorator: Google::Apis::SheetsV4::DimensionRange::Representation - - property :destination_index, as: 'destinationIndex' - end - end - - class BasicChartAxis - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :position, as: 'position' - property :title, as: 'title' - property :format, as: 'format', class: Google::Apis::SheetsV4::TextFormat, decorator: Google::Apis::SheetsV4::TextFormat::Representation - - end - end - - class PivotGroupSortValueBucket - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :buckets, as: 'buckets', class: Google::Apis::SheetsV4::ExtendedValue, decorator: Google::Apis::SheetsV4::ExtendedValue::Representation - - property :values_index, as: 'valuesIndex' - end - end - - class DimensionProperties - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :hidden_by_user, as: 'hiddenByUser' - property :pixel_size, as: 'pixelSize' - property :hidden_by_filter, as: 'hiddenByFilter' - end - end - - class EmbeddedObjectPosition - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :sheet_id, as: 'sheetId' - property :overlay_position, as: 'overlayPosition', class: Google::Apis::SheetsV4::OverlayPosition, decorator: Google::Apis::SheetsV4::OverlayPosition::Representation - - property :new_sheet, as: 'newSheet' - end - end - - class InterpolationPoint - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :value, as: 'value' - property :color, as: 'color', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation - - property :type, as: 'type' - end - end - - class ErrorValue - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :type, as: 'type' - property :message, as: 'message' - end - end - - class DuplicateFilterViewRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :filter_id, as: 'filterId' - end - end - - class BatchUpdateSpreadsheetRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :include_spreadsheet_in_response, as: 'includeSpreadsheetInResponse' - collection :requests, as: 'requests', class: Google::Apis::SheetsV4::Request, decorator: Google::Apis::SheetsV4::Request::Representation - - collection :response_ranges, as: 'responseRanges' - property :response_include_grid_data, as: 'responseIncludeGridData' - end - end - - class SheetProperties - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :title, as: 'title' - property :index, as: 'index' - property :hidden, as: 'hidden' - property :grid_properties, as: 'gridProperties', class: Google::Apis::SheetsV4::GridProperties, decorator: Google::Apis::SheetsV4::GridProperties::Representation - - property :sheet_id, as: 'sheetId' - property :right_to_left, as: 'rightToLeft' - property :tab_color, as: 'tabColor', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation - - property :sheet_type, as: 'sheetType' - end - end - - class ClearValuesRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end - end - - class ProtectedRange - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :unprotected_ranges, as: 'unprotectedRanges', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - - property :description, as: 'description' - property :named_range_id, as: 'namedRangeId' - property :requesting_user_can_edit, as: 'requestingUserCanEdit' - property :editors, as: 'editors', class: Google::Apis::SheetsV4::Editors, decorator: Google::Apis::SheetsV4::Editors::Representation - - property :protected_range_id, as: 'protectedRangeId' - property :warning_only, as: 'warningOnly' property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation end end - class DeleteConditionalFormatRuleRequest + class DeleteConditionalFormatRuleResponse # @private class Representation < Google::Apis::Core::JsonRepresentation - property :sheet_id, as: 'sheetId' - property :index, as: 'index' + property :rule, as: 'rule', class: Google::Apis::SheetsV4::ConditionalFormatRule, decorator: Google::Apis::SheetsV4::ConditionalFormatRule::Representation + end end @@ -1538,70 +1582,48 @@ module Google end end - class InsertRangeRequest + class GridCoordinate # @private class Representation < Google::Apis::Core::JsonRepresentation - property :shift_dimension, as: 'shiftDimension' - property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - - end - end - - class ChartSpec - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :hidden_dimension_strategy, as: 'hiddenDimensionStrategy' - property :basic_chart, as: 'basicChart', class: Google::Apis::SheetsV4::BasicChartSpec, decorator: Google::Apis::SheetsV4::BasicChartSpec::Representation - - property :title, as: 'title' - property :pie_chart, as: 'pieChart', class: Google::Apis::SheetsV4::PieChartSpec, decorator: Google::Apis::SheetsV4::PieChartSpec::Representation - - end - end - - class SourceAndDestination - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :source, as: 'source', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - - property :fill_length, as: 'fillLength' - property :dimension, as: 'dimension' - end - end - - class ConditionValue - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :relative_date, as: 'relativeDate' - property :user_entered_value, as: 'userEnteredValue' - end - end - - class PasteDataRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :data, as: 'data' - property :coordinate, as: 'coordinate', class: Google::Apis::SheetsV4::GridCoordinate, decorator: Google::Apis::SheetsV4::GridCoordinate::Representation - - property :delimiter, as: 'delimiter' - property :type, as: 'type' - property :html, as: 'html' - end - end - - class FindReplaceRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :find, as: 'find' - property :replacement, as: 'replacement' - property :search_by_regex, as: 'searchByRegex' property :sheet_id, as: 'sheetId' - property :all_sheets, as: 'allSheets' - property :match_case, as: 'matchCase' - property :include_formulas, as: 'includeFormulas' + property :row_index, as: 'rowIndex' + property :column_index, as: 'columnIndex' + end + end + + class UpdateSheetPropertiesRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :fields, as: 'fields' + property :properties, as: 'properties', class: Google::Apis::SheetsV4::SheetProperties, decorator: Google::Apis::SheetsV4::SheetProperties::Representation + + end + end + + class UnmergeCellsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - property :match_entire_cell, as: 'matchEntireCell' + end + end + + class GridProperties + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :row_count, as: 'rowCount' + property :frozen_row_count, as: 'frozenRowCount' + property :hide_gridlines, as: 'hideGridlines' + property :column_count, as: 'columnCount' + property :frozen_column_count, as: 'frozenColumnCount' + end + end + + class UpdateEmbeddedObjectPositionResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :position, as: 'position', class: Google::Apis::SheetsV4::EmbeddedObjectPosition, decorator: Google::Apis::SheetsV4::EmbeddedObjectPosition::Representation + end end @@ -1613,325 +1635,6 @@ module Google end end - class CopySheetToAnotherSpreadsheetRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :destination_spreadsheet_id, as: 'destinationSpreadsheetId' - end - end - - class NumberFormat - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :pattern, as: 'pattern' - property :type, as: 'type' - end - end - - class BatchClearValuesRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :ranges, as: 'ranges' - end - end - - class UpdateDimensionPropertiesRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :fields, as: 'fields' - property :range, as: 'range', class: Google::Apis::SheetsV4::DimensionRange, decorator: Google::Apis::SheetsV4::DimensionRange::Representation - - property :properties, as: 'properties', class: Google::Apis::SheetsV4::DimensionProperties, decorator: Google::Apis::SheetsV4::DimensionProperties::Representation - - end - end - - class Editors - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :users, as: 'users' - collection :groups, as: 'groups' - property :domain_users_can_edit, as: 'domainUsersCanEdit' - end - end - - class Spreadsheet - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :spreadsheet_id, as: 'spreadsheetId' - property :properties, as: 'properties', class: Google::Apis::SheetsV4::SpreadsheetProperties, decorator: Google::Apis::SheetsV4::SpreadsheetProperties::Representation - - property :spreadsheet_url, as: 'spreadsheetUrl' - collection :sheets, as: 'sheets', class: Google::Apis::SheetsV4::Sheet, decorator: Google::Apis::SheetsV4::Sheet::Representation - - collection :named_ranges, as: 'namedRanges', class: Google::Apis::SheetsV4::NamedRange, decorator: Google::Apis::SheetsV4::NamedRange::Representation - - end - end - - class GridData - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :column_metadata, as: 'columnMetadata', class: Google::Apis::SheetsV4::DimensionProperties, decorator: Google::Apis::SheetsV4::DimensionProperties::Representation - - collection :row_data, as: 'rowData', class: Google::Apis::SheetsV4::RowData, decorator: Google::Apis::SheetsV4::RowData::Representation - - property :start_row, as: 'startRow' - collection :row_metadata, as: 'rowMetadata', class: Google::Apis::SheetsV4::DimensionProperties, decorator: Google::Apis::SheetsV4::DimensionProperties::Representation - - property :start_column, as: 'startColumn' - end - end - - class PivotValue - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :formula, as: 'formula' - property :source_column_offset, as: 'sourceColumnOffset' - property :summarize_function, as: 'summarizeFunction' - property :name, as: 'name' - end - end - - class DeleteBandingRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :banded_range_id, as: 'bandedRangeId' - end - end - - class BasicFilter - # @private - class Representation < Google::Apis::Core::JsonRepresentation - hash :criteria, as: 'criteria', class: Google::Apis::SheetsV4::FilterCriteria, decorator: Google::Apis::SheetsV4::FilterCriteria::Representation - - property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - - collection :sort_specs, as: 'sortSpecs', class: Google::Apis::SheetsV4::SortSpec, decorator: Google::Apis::SheetsV4::SortSpec::Representation - - end - end - - class DuplicateSheetRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :source_sheet_id, as: 'sourceSheetId' - property :new_sheet_id, as: 'newSheetId' - property :insert_sheet_index, as: 'insertSheetIndex' - property :new_sheet_name, as: 'newSheetName' - end - end - - class AddFilterViewResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :filter, as: 'filter', class: Google::Apis::SheetsV4::FilterView, decorator: Google::Apis::SheetsV4::FilterView::Representation - - end - end - - class DuplicateSheetResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :properties, as: 'properties', class: Google::Apis::SheetsV4::SheetProperties, decorator: Google::Apis::SheetsV4::SheetProperties::Representation - - end - end - - class Border - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :style, as: 'style' - property :width, as: 'width' - property :color, as: 'color', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation - - end - end - - class AddNamedRangeRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :named_range, as: 'namedRange', class: Google::Apis::SheetsV4::NamedRange, decorator: Google::Apis::SheetsV4::NamedRange::Representation - - end - end - - class AddChartResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :chart, as: 'chart', class: Google::Apis::SheetsV4::EmbeddedChart, decorator: Google::Apis::SheetsV4::EmbeddedChart::Representation - - end - end - - class AddBandingRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :banded_range, as: 'bandedRange', class: Google::Apis::SheetsV4::BandedRange, decorator: Google::Apis::SheetsV4::BandedRange::Representation - - end - end - - class AppendCellsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :sheet_id, as: 'sheetId' - collection :rows, as: 'rows', class: Google::Apis::SheetsV4::RowData, decorator: Google::Apis::SheetsV4::RowData::Representation - - property :fields, as: 'fields' - end - end - - class RowData - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :values, as: 'values', class: Google::Apis::SheetsV4::CellData, decorator: Google::Apis::SheetsV4::CellData::Representation - - end - end - - class BasicChartSeries - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :series, as: 'series', class: Google::Apis::SheetsV4::ChartData, decorator: Google::Apis::SheetsV4::ChartData::Representation - - property :target_axis, as: 'targetAxis' - property :type, as: 'type' - end - end - - class NamedRange - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :named_range_id, as: 'namedRangeId' - property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - - property :name, as: 'name' - end - end - - class RepeatCellRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :cell, as: 'cell', class: Google::Apis::SheetsV4::CellData, decorator: Google::Apis::SheetsV4::CellData::Representation - - property :fields, as: 'fields' - property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - - end - end - - class BasicChartSpec - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :chart_type, as: 'chartType' - collection :domains, as: 'domains', class: Google::Apis::SheetsV4::BasicChartDomain, decorator: Google::Apis::SheetsV4::BasicChartDomain::Representation - - property :header_count, as: 'headerCount' - collection :series, as: 'series', class: Google::Apis::SheetsV4::BasicChartSeries, decorator: Google::Apis::SheetsV4::BasicChartSeries::Representation - - property :legend_position, as: 'legendPosition' - collection :axis, as: 'axis', class: Google::Apis::SheetsV4::BasicChartAxis, decorator: Google::Apis::SheetsV4::BasicChartAxis::Representation - - end - end - - class UpdateEmbeddedObjectPositionRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :new_position, as: 'newPosition', class: Google::Apis::SheetsV4::EmbeddedObjectPosition, decorator: Google::Apis::SheetsV4::EmbeddedObjectPosition::Representation - - property :object_id_prop, as: 'objectId' - property :fields, as: 'fields' - end - end - - class SetBasicFilterRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :filter, as: 'filter', class: Google::Apis::SheetsV4::BasicFilter, decorator: Google::Apis::SheetsV4::BasicFilter::Representation - - end - end - - class AutoResizeDimensionsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :dimensions, as: 'dimensions', class: Google::Apis::SheetsV4::DimensionRange, decorator: Google::Apis::SheetsV4::DimensionRange::Representation - - end - end - - class DuplicateFilterViewResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :filter, as: 'filter', class: Google::Apis::SheetsV4::FilterView, decorator: Google::Apis::SheetsV4::FilterView::Representation - - end - end - - class BandingProperties - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :footer_color, as: 'footerColor', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation - - property :header_color, as: 'headerColor', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation - - property :second_band_color, as: 'secondBandColor', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation - - property :first_band_color, as: 'firstBandColor', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation - - end - end - - class PivotGroup - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :sort_order, as: 'sortOrder' - property :source_column_offset, as: 'sourceColumnOffset' - property :show_totals, as: 'showTotals' - property :value_bucket, as: 'valueBucket', class: Google::Apis::SheetsV4::PivotGroupSortValueBucket, decorator: Google::Apis::SheetsV4::PivotGroupSortValueBucket::Representation - - collection :value_metadata, as: 'valueMetadata', class: Google::Apis::SheetsV4::PivotGroupValueMetadata, decorator: Google::Apis::SheetsV4::PivotGroupValueMetadata::Representation - - end - end - - class GridRange - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :sheet_id, as: 'sheetId' - property :start_column_index, as: 'startColumnIndex' - property :start_row_index, as: 'startRowIndex' - property :end_row_index, as: 'endRowIndex' - property :end_column_index, as: 'endColumnIndex' - end - end - - class DeleteSheetRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :sheet_id, as: 'sheetId' - end - end - - class UpdateBandingRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :banded_range, as: 'bandedRange', class: Google::Apis::SheetsV4::BandedRange, decorator: Google::Apis::SheetsV4::BandedRange::Representation - - property :fields, as: 'fields' - end - end - - class ChartData - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :source_range, as: 'sourceRange', class: Google::Apis::SheetsV4::ChartSourceRange, decorator: Google::Apis::SheetsV4::ChartSourceRange::Representation - - end - end - class Sheet # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1956,122 +1659,6 @@ module Google end end - class CopyPasteRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :paste_type, as: 'pasteType' - property :paste_orientation, as: 'pasteOrientation' - property :source, as: 'source', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - - property :destination, as: 'destination', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - - end - end - - class UpdateCellsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :rows, as: 'rows', class: Google::Apis::SheetsV4::RowData, decorator: Google::Apis::SheetsV4::RowData::Representation - - property :fields, as: 'fields' - property :start, as: 'start', class: Google::Apis::SheetsV4::GridCoordinate, decorator: Google::Apis::SheetsV4::GridCoordinate::Representation - - property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - - end - end - - class ExtendedValue - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :formula_value, as: 'formulaValue' - property :error_value, as: 'errorValue', class: Google::Apis::SheetsV4::ErrorValue, decorator: Google::Apis::SheetsV4::ErrorValue::Representation - - property :bool_value, as: 'boolValue' - property :number_value, as: 'numberValue' - property :string_value, as: 'stringValue' - end - end - - class BatchUpdateSpreadsheetResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :spreadsheet_id, as: 'spreadsheetId' - property :updated_spreadsheet, as: 'updatedSpreadsheet', class: Google::Apis::SheetsV4::Spreadsheet, decorator: Google::Apis::SheetsV4::Spreadsheet::Representation - - collection :replies, as: 'replies', class: Google::Apis::SheetsV4::Response, decorator: Google::Apis::SheetsV4::Response::Representation - - end - end - - class GradientRule - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :maxpoint, as: 'maxpoint', class: Google::Apis::SheetsV4::InterpolationPoint, decorator: Google::Apis::SheetsV4::InterpolationPoint::Representation - - property :midpoint, as: 'midpoint', class: Google::Apis::SheetsV4::InterpolationPoint, decorator: Google::Apis::SheetsV4::InterpolationPoint::Representation - - property :minpoint, as: 'minpoint', class: Google::Apis::SheetsV4::InterpolationPoint, decorator: Google::Apis::SheetsV4::InterpolationPoint::Representation - - end - end - - class CutPasteRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :paste_type, as: 'pasteType' - property :source, as: 'source', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - - property :destination, as: 'destination', class: Google::Apis::SheetsV4::GridCoordinate, decorator: Google::Apis::SheetsV4::GridCoordinate::Representation - - end - end - - class OverlayPosition - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :width_pixels, as: 'widthPixels' - property :anchor_cell, as: 'anchorCell', class: Google::Apis::SheetsV4::GridCoordinate, decorator: Google::Apis::SheetsV4::GridCoordinate::Representation - - property :offset_x_pixels, as: 'offsetXPixels' - property :height_pixels, as: 'heightPixels' - property :offset_y_pixels, as: 'offsetYPixels' - end - end - - class AutoFillRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :use_alternate_series, as: 'useAlternateSeries' - property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - - property :source_and_destination, as: 'sourceAndDestination', class: Google::Apis::SheetsV4::SourceAndDestination, decorator: Google::Apis::SheetsV4::SourceAndDestination::Representation - - end - end - - class PieChartSpec - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :legend_position, as: 'legendPosition' - property :series, as: 'series', class: Google::Apis::SheetsV4::ChartData, decorator: Google::Apis::SheetsV4::ChartData::Representation - - property :pie_hole, as: 'pieHole' - property :three_dimensional, as: 'threeDimensional' - property :domain, as: 'domain', class: Google::Apis::SheetsV4::ChartData, decorator: Google::Apis::SheetsV4::ChartData::Representation - - end - end - - class UpdateSheetPropertiesRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :fields, as: 'fields' - property :properties, as: 'properties', class: Google::Apis::SheetsV4::SheetProperties, decorator: Google::Apis::SheetsV4::SheetProperties::Representation - - end - end - class BooleanRule # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -2082,46 +1669,284 @@ module Google end end + class FilterCriteria + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :hidden_values, as: 'hiddenValues' + property :condition, as: 'condition', class: Google::Apis::SheetsV4::BooleanCondition, decorator: Google::Apis::SheetsV4::BooleanCondition::Representation + + end + end + + class PivotGroupValueMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :value, as: 'value', class: Google::Apis::SheetsV4::ExtendedValue, decorator: Google::Apis::SheetsV4::ExtendedValue::Representation + + property :collapsed, as: 'collapsed' + end + end + + class Editors + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :users, as: 'users' + collection :groups, as: 'groups' + property :domain_users_can_edit, as: 'domainUsersCanEdit' + end + end + + class UpdateConditionalFormatRuleRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :rule, as: 'rule', class: Google::Apis::SheetsV4::ConditionalFormatRule, decorator: Google::Apis::SheetsV4::ConditionalFormatRule::Representation + + property :index, as: 'index' + property :sheet_id, as: 'sheetId' + property :new_index, as: 'newIndex' + end + end + + class DataValidationRule + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :condition, as: 'condition', class: Google::Apis::SheetsV4::BooleanCondition, decorator: Google::Apis::SheetsV4::BooleanCondition::Representation + + property :show_custom_ui, as: 'showCustomUi' + property :strict, as: 'strict' + property :input_message, as: 'inputMessage' + end + end + + class BasicChartDomain + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :domain, as: 'domain', class: Google::Apis::SheetsV4::ChartData, decorator: Google::Apis::SheetsV4::ChartData::Representation + + end + end + + class PasteDataRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :html, as: 'html' + property :coordinate, as: 'coordinate', class: Google::Apis::SheetsV4::GridCoordinate, decorator: Google::Apis::SheetsV4::GridCoordinate::Representation + + property :data, as: 'data' + property :delimiter, as: 'delimiter' + property :type, as: 'type' + end + end + class AppendDimensionRequest # @private class Representation < Google::Apis::Core::JsonRepresentation property :sheet_id, as: 'sheetId' - property :length, as: 'length' property :dimension, as: 'dimension' + property :length, as: 'length' end end - class AddFilterViewRequest + class AddNamedRangeRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :named_range, as: 'namedRange', class: Google::Apis::SheetsV4::NamedRange, decorator: Google::Apis::SheetsV4::NamedRange::Representation + + end + end + + class UpdateEmbeddedObjectPositionRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :new_position, as: 'newPosition', class: Google::Apis::SheetsV4::EmbeddedObjectPosition, decorator: Google::Apis::SheetsV4::EmbeddedObjectPosition::Representation + + property :fields, as: 'fields' + property :object_id_prop, as: 'objectId' + end + end + + class PieChartSpec + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :legend_position, as: 'legendPosition' + property :pie_hole, as: 'pieHole' + property :domain, as: 'domain', class: Google::Apis::SheetsV4::ChartData, decorator: Google::Apis::SheetsV4::ChartData::Representation + + property :three_dimensional, as: 'threeDimensional' + property :series, as: 'series', class: Google::Apis::SheetsV4::ChartData, decorator: Google::Apis::SheetsV4::ChartData::Representation + + end + end + + class UpdateFilterViewRequest # @private class Representation < Google::Apis::Core::JsonRepresentation property :filter, as: 'filter', class: Google::Apis::SheetsV4::FilterView, decorator: Google::Apis::SheetsV4::FilterView::Representation + property :fields, as: 'fields' end end - class GridProperties + class ConditionalFormatRule # @private class Representation < Google::Apis::Core::JsonRepresentation - property :row_count, as: 'rowCount' - property :column_count, as: 'columnCount' - property :frozen_row_count, as: 'frozenRowCount' - property :frozen_column_count, as: 'frozenColumnCount' - property :hide_gridlines, as: 'hideGridlines' + collection :ranges, as: 'ranges', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + property :gradient_rule, as: 'gradientRule', class: Google::Apis::SheetsV4::GradientRule, decorator: Google::Apis::SheetsV4::GradientRule::Representation + + property :boolean_rule, as: 'booleanRule', class: Google::Apis::SheetsV4::BooleanRule, decorator: Google::Apis::SheetsV4::BooleanRule::Representation + end end - class DeleteNamedRangeRequest + class CopyPasteRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - property :named_range_id, as: 'namedRangeId' + property :source, as: 'source', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + property :paste_type, as: 'pasteType' + property :destination, as: 'destination', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + property :paste_orientation, as: 'pasteOrientation' end end - class AddChartRequest + class Request # @private class Representation < Google::Apis::Core::JsonRepresentation - property :chart, as: 'chart', class: Google::Apis::SheetsV4::EmbeddedChart, decorator: Google::Apis::SheetsV4::EmbeddedChart::Representation + property :add_conditional_format_rule, as: 'addConditionalFormatRule', class: Google::Apis::SheetsV4::AddConditionalFormatRuleRequest, decorator: Google::Apis::SheetsV4::AddConditionalFormatRuleRequest::Representation + property :add_named_range, as: 'addNamedRange', class: Google::Apis::SheetsV4::AddNamedRangeRequest, decorator: Google::Apis::SheetsV4::AddNamedRangeRequest::Representation + + property :update_cells, as: 'updateCells', class: Google::Apis::SheetsV4::UpdateCellsRequest, decorator: Google::Apis::SheetsV4::UpdateCellsRequest::Representation + + property :update_spreadsheet_properties, as: 'updateSpreadsheetProperties', class: Google::Apis::SheetsV4::UpdateSpreadsheetPropertiesRequest, decorator: Google::Apis::SheetsV4::UpdateSpreadsheetPropertiesRequest::Representation + + property :delete_embedded_object, as: 'deleteEmbeddedObject', class: Google::Apis::SheetsV4::DeleteEmbeddedObjectRequest, decorator: Google::Apis::SheetsV4::DeleteEmbeddedObjectRequest::Representation + + property :update_filter_view, as: 'updateFilterView', class: Google::Apis::SheetsV4::UpdateFilterViewRequest, decorator: Google::Apis::SheetsV4::UpdateFilterViewRequest::Representation + + property :add_banding, as: 'addBanding', class: Google::Apis::SheetsV4::AddBandingRequest, decorator: Google::Apis::SheetsV4::AddBandingRequest::Representation + + property :append_cells, as: 'appendCells', class: Google::Apis::SheetsV4::AppendCellsRequest, decorator: Google::Apis::SheetsV4::AppendCellsRequest::Representation + + property :auto_resize_dimensions, as: 'autoResizeDimensions', class: Google::Apis::SheetsV4::AutoResizeDimensionsRequest, decorator: Google::Apis::SheetsV4::AutoResizeDimensionsRequest::Representation + + property :cut_paste, as: 'cutPaste', class: Google::Apis::SheetsV4::CutPasteRequest, decorator: Google::Apis::SheetsV4::CutPasteRequest::Representation + + property :merge_cells, as: 'mergeCells', class: Google::Apis::SheetsV4::MergeCellsRequest, decorator: Google::Apis::SheetsV4::MergeCellsRequest::Representation + + property :update_named_range, as: 'updateNamedRange', class: Google::Apis::SheetsV4::UpdateNamedRangeRequest, decorator: Google::Apis::SheetsV4::UpdateNamedRangeRequest::Representation + + property :update_sheet_properties, as: 'updateSheetProperties', class: Google::Apis::SheetsV4::UpdateSheetPropertiesRequest, decorator: Google::Apis::SheetsV4::UpdateSheetPropertiesRequest::Representation + + property :delete_dimension, as: 'deleteDimension', class: Google::Apis::SheetsV4::DeleteDimensionRequest, decorator: Google::Apis::SheetsV4::DeleteDimensionRequest::Representation + + property :auto_fill, as: 'autoFill', class: Google::Apis::SheetsV4::AutoFillRequest, decorator: Google::Apis::SheetsV4::AutoFillRequest::Representation + + property :sort_range, as: 'sortRange', class: Google::Apis::SheetsV4::SortRangeRequest, decorator: Google::Apis::SheetsV4::SortRangeRequest::Representation + + property :delete_protected_range, as: 'deleteProtectedRange', class: Google::Apis::SheetsV4::DeleteProtectedRangeRequest, decorator: Google::Apis::SheetsV4::DeleteProtectedRangeRequest::Representation + + property :duplicate_filter_view, as: 'duplicateFilterView', class: Google::Apis::SheetsV4::DuplicateFilterViewRequest, decorator: Google::Apis::SheetsV4::DuplicateFilterViewRequest::Representation + + property :add_chart, as: 'addChart', class: Google::Apis::SheetsV4::AddChartRequest, decorator: Google::Apis::SheetsV4::AddChartRequest::Representation + + property :find_replace, as: 'findReplace', class: Google::Apis::SheetsV4::FindReplaceRequest, decorator: Google::Apis::SheetsV4::FindReplaceRequest::Representation + + property :text_to_columns, as: 'textToColumns', class: Google::Apis::SheetsV4::TextToColumnsRequest, decorator: Google::Apis::SheetsV4::TextToColumnsRequest::Representation + + property :update_chart_spec, as: 'updateChartSpec', class: Google::Apis::SheetsV4::UpdateChartSpecRequest, decorator: Google::Apis::SheetsV4::UpdateChartSpecRequest::Representation + + property :add_sheet, as: 'addSheet', class: Google::Apis::SheetsV4::AddSheetRequest, decorator: Google::Apis::SheetsV4::AddSheetRequest::Representation + + property :update_protected_range, as: 'updateProtectedRange', class: Google::Apis::SheetsV4::UpdateProtectedRangeRequest, decorator: Google::Apis::SheetsV4::UpdateProtectedRangeRequest::Representation + + property :delete_filter_view, as: 'deleteFilterView', class: Google::Apis::SheetsV4::DeleteFilterViewRequest, decorator: Google::Apis::SheetsV4::DeleteFilterViewRequest::Representation + + property :copy_paste, as: 'copyPaste', class: Google::Apis::SheetsV4::CopyPasteRequest, decorator: Google::Apis::SheetsV4::CopyPasteRequest::Representation + + property :insert_dimension, as: 'insertDimension', class: Google::Apis::SheetsV4::InsertDimensionRequest, decorator: Google::Apis::SheetsV4::InsertDimensionRequest::Representation + + property :delete_range, as: 'deleteRange', class: Google::Apis::SheetsV4::DeleteRangeRequest, decorator: Google::Apis::SheetsV4::DeleteRangeRequest::Representation + + property :delete_banding, as: 'deleteBanding', class: Google::Apis::SheetsV4::DeleteBandingRequest, decorator: Google::Apis::SheetsV4::DeleteBandingRequest::Representation + + property :add_filter_view, as: 'addFilterView', class: Google::Apis::SheetsV4::AddFilterViewRequest, decorator: Google::Apis::SheetsV4::AddFilterViewRequest::Representation + + property :set_data_validation, as: 'setDataValidation', class: Google::Apis::SheetsV4::SetDataValidationRequest, decorator: Google::Apis::SheetsV4::SetDataValidationRequest::Representation + + property :update_borders, as: 'updateBorders', class: Google::Apis::SheetsV4::UpdateBordersRequest, decorator: Google::Apis::SheetsV4::UpdateBordersRequest::Representation + + property :delete_conditional_format_rule, as: 'deleteConditionalFormatRule', class: Google::Apis::SheetsV4::DeleteConditionalFormatRuleRequest, decorator: Google::Apis::SheetsV4::DeleteConditionalFormatRuleRequest::Representation + + property :repeat_cell, as: 'repeatCell', class: Google::Apis::SheetsV4::RepeatCellRequest, decorator: Google::Apis::SheetsV4::RepeatCellRequest::Representation + + property :clear_basic_filter, as: 'clearBasicFilter', class: Google::Apis::SheetsV4::ClearBasicFilterRequest, decorator: Google::Apis::SheetsV4::ClearBasicFilterRequest::Representation + + property :append_dimension, as: 'appendDimension', class: Google::Apis::SheetsV4::AppendDimensionRequest, decorator: Google::Apis::SheetsV4::AppendDimensionRequest::Representation + + property :update_conditional_format_rule, as: 'updateConditionalFormatRule', class: Google::Apis::SheetsV4::UpdateConditionalFormatRuleRequest, decorator: Google::Apis::SheetsV4::UpdateConditionalFormatRuleRequest::Representation + + property :insert_range, as: 'insertRange', class: Google::Apis::SheetsV4::InsertRangeRequest, decorator: Google::Apis::SheetsV4::InsertRangeRequest::Representation + + property :move_dimension, as: 'moveDimension', class: Google::Apis::SheetsV4::MoveDimensionRequest, decorator: Google::Apis::SheetsV4::MoveDimensionRequest::Representation + + property :update_banding, as: 'updateBanding', class: Google::Apis::SheetsV4::UpdateBandingRequest, decorator: Google::Apis::SheetsV4::UpdateBandingRequest::Representation + + property :delete_named_range, as: 'deleteNamedRange', class: Google::Apis::SheetsV4::DeleteNamedRangeRequest, decorator: Google::Apis::SheetsV4::DeleteNamedRangeRequest::Representation + + property :add_protected_range, as: 'addProtectedRange', class: Google::Apis::SheetsV4::AddProtectedRangeRequest, decorator: Google::Apis::SheetsV4::AddProtectedRangeRequest::Representation + + property :duplicate_sheet, as: 'duplicateSheet', class: Google::Apis::SheetsV4::DuplicateSheetRequest, decorator: Google::Apis::SheetsV4::DuplicateSheetRequest::Representation + + property :delete_sheet, as: 'deleteSheet', class: Google::Apis::SheetsV4::DeleteSheetRequest, decorator: Google::Apis::SheetsV4::DeleteSheetRequest::Representation + + property :unmerge_cells, as: 'unmergeCells', class: Google::Apis::SheetsV4::UnmergeCellsRequest, decorator: Google::Apis::SheetsV4::UnmergeCellsRequest::Representation + + property :update_embedded_object_position, as: 'updateEmbeddedObjectPosition', class: Google::Apis::SheetsV4::UpdateEmbeddedObjectPositionRequest, decorator: Google::Apis::SheetsV4::UpdateEmbeddedObjectPositionRequest::Representation + + property :update_dimension_properties, as: 'updateDimensionProperties', class: Google::Apis::SheetsV4::UpdateDimensionPropertiesRequest, decorator: Google::Apis::SheetsV4::UpdateDimensionPropertiesRequest::Representation + + property :paste_data, as: 'pasteData', class: Google::Apis::SheetsV4::PasteDataRequest, decorator: Google::Apis::SheetsV4::PasteDataRequest::Representation + + property :set_basic_filter, as: 'setBasicFilter', class: Google::Apis::SheetsV4::SetBasicFilterRequest, decorator: Google::Apis::SheetsV4::SetBasicFilterRequest::Representation + + end + end + + class BooleanCondition + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :type, as: 'type' + collection :values, as: 'values', class: Google::Apis::SheetsV4::ConditionValue, decorator: Google::Apis::SheetsV4::ConditionValue::Representation + + end + end + + class GridRange + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :end_row_index, as: 'endRowIndex' + property :end_column_index, as: 'endColumnIndex' + property :start_row_index, as: 'startRowIndex' + property :start_column_index, as: 'startColumnIndex' + property :sheet_id, as: 'sheetId' + end + end + + class BasicChartSpec + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :domains, as: 'domains', class: Google::Apis::SheetsV4::BasicChartDomain, decorator: Google::Apis::SheetsV4::BasicChartDomain::Representation + + property :header_count, as: 'headerCount' + collection :axis, as: 'axis', class: Google::Apis::SheetsV4::BasicChartAxis, decorator: Google::Apis::SheetsV4::BasicChartAxis::Representation + + property :chart_type, as: 'chartType' + collection :series, as: 'series', class: Google::Apis::SheetsV4::BasicChartSeries, decorator: Google::Apis::SheetsV4::BasicChartSeries::Representation + + property :legend_position, as: 'legendPosition' end end @@ -2135,153 +1960,328 @@ module Google end end - class Request + class CellData # @private class Representation < Google::Apis::Core::JsonRepresentation - property :update_embedded_object_position, as: 'updateEmbeddedObjectPosition', class: Google::Apis::SheetsV4::UpdateEmbeddedObjectPositionRequest, decorator: Google::Apis::SheetsV4::UpdateEmbeddedObjectPositionRequest::Representation + property :effective_value, as: 'effectiveValue', class: Google::Apis::SheetsV4::ExtendedValue, decorator: Google::Apis::SheetsV4::ExtendedValue::Representation - property :delete_named_range, as: 'deleteNamedRange', class: Google::Apis::SheetsV4::DeleteNamedRangeRequest, decorator: Google::Apis::SheetsV4::DeleteNamedRangeRequest::Representation + collection :text_format_runs, as: 'textFormatRuns', class: Google::Apis::SheetsV4::TextFormatRun, decorator: Google::Apis::SheetsV4::TextFormatRun::Representation - property :update_named_range, as: 'updateNamedRange', class: Google::Apis::SheetsV4::UpdateNamedRangeRequest, decorator: Google::Apis::SheetsV4::UpdateNamedRangeRequest::Representation + property :formatted_value, as: 'formattedValue' + property :hyperlink, as: 'hyperlink' + property :pivot_table, as: 'pivotTable', class: Google::Apis::SheetsV4::PivotTable, decorator: Google::Apis::SheetsV4::PivotTable::Representation - property :add_filter_view, as: 'addFilterView', class: Google::Apis::SheetsV4::AddFilterViewRequest, decorator: Google::Apis::SheetsV4::AddFilterViewRequest::Representation + property :user_entered_format, as: 'userEnteredFormat', class: Google::Apis::SheetsV4::CellFormat, decorator: Google::Apis::SheetsV4::CellFormat::Representation - property :update_spreadsheet_properties, as: 'updateSpreadsheetProperties', class: Google::Apis::SheetsV4::UpdateSpreadsheetPropertiesRequest, decorator: Google::Apis::SheetsV4::UpdateSpreadsheetPropertiesRequest::Representation + property :effective_format, as: 'effectiveFormat', class: Google::Apis::SheetsV4::CellFormat, decorator: Google::Apis::SheetsV4::CellFormat::Representation - property :append_dimension, as: 'appendDimension', class: Google::Apis::SheetsV4::AppendDimensionRequest, decorator: Google::Apis::SheetsV4::AppendDimensionRequest::Representation + property :note, as: 'note' + property :user_entered_value, as: 'userEnteredValue', class: Google::Apis::SheetsV4::ExtendedValue, decorator: Google::Apis::SheetsV4::ExtendedValue::Representation - property :unmerge_cells, as: 'unmergeCells', class: Google::Apis::SheetsV4::UnmergeCellsRequest, decorator: Google::Apis::SheetsV4::UnmergeCellsRequest::Representation - - property :insert_range, as: 'insertRange', class: Google::Apis::SheetsV4::InsertRangeRequest, decorator: Google::Apis::SheetsV4::InsertRangeRequest::Representation - - property :update_protected_range, as: 'updateProtectedRange', class: Google::Apis::SheetsV4::UpdateProtectedRangeRequest, decorator: Google::Apis::SheetsV4::UpdateProtectedRangeRequest::Representation - - property :delete_filter_view, as: 'deleteFilterView', class: Google::Apis::SheetsV4::DeleteFilterViewRequest, decorator: Google::Apis::SheetsV4::DeleteFilterViewRequest::Representation - - property :clear_basic_filter, as: 'clearBasicFilter', class: Google::Apis::SheetsV4::ClearBasicFilterRequest, decorator: Google::Apis::SheetsV4::ClearBasicFilterRequest::Representation - - property :sort_range, as: 'sortRange', class: Google::Apis::SheetsV4::SortRangeRequest, decorator: Google::Apis::SheetsV4::SortRangeRequest::Representation - - property :repeat_cell, as: 'repeatCell', class: Google::Apis::SheetsV4::RepeatCellRequest, decorator: Google::Apis::SheetsV4::RepeatCellRequest::Representation - - property :set_data_validation, as: 'setDataValidation', class: Google::Apis::SheetsV4::SetDataValidationRequest, decorator: Google::Apis::SheetsV4::SetDataValidationRequest::Representation - - property :update_cells, as: 'updateCells', class: Google::Apis::SheetsV4::UpdateCellsRequest, decorator: Google::Apis::SheetsV4::UpdateCellsRequest::Representation - - property :add_sheet, as: 'addSheet', class: Google::Apis::SheetsV4::AddSheetRequest, decorator: Google::Apis::SheetsV4::AddSheetRequest::Representation - - property :update_filter_view, as: 'updateFilterView', class: Google::Apis::SheetsV4::UpdateFilterViewRequest, decorator: Google::Apis::SheetsV4::UpdateFilterViewRequest::Representation - - property :update_sheet_properties, as: 'updateSheetProperties', class: Google::Apis::SheetsV4::UpdateSheetPropertiesRequest, decorator: Google::Apis::SheetsV4::UpdateSheetPropertiesRequest::Representation - - property :update_dimension_properties, as: 'updateDimensionProperties', class: Google::Apis::SheetsV4::UpdateDimensionPropertiesRequest, decorator: Google::Apis::SheetsV4::UpdateDimensionPropertiesRequest::Representation - - property :delete_sheet, as: 'deleteSheet', class: Google::Apis::SheetsV4::DeleteSheetRequest, decorator: Google::Apis::SheetsV4::DeleteSheetRequest::Representation - - property :find_replace, as: 'findReplace', class: Google::Apis::SheetsV4::FindReplaceRequest, decorator: Google::Apis::SheetsV4::FindReplaceRequest::Representation - - property :add_protected_range, as: 'addProtectedRange', class: Google::Apis::SheetsV4::AddProtectedRangeRequest, decorator: Google::Apis::SheetsV4::AddProtectedRangeRequest::Representation - - property :delete_protected_range, as: 'deleteProtectedRange', class: Google::Apis::SheetsV4::DeleteProtectedRangeRequest, decorator: Google::Apis::SheetsV4::DeleteProtectedRangeRequest::Representation - - property :update_conditional_format_rule, as: 'updateConditionalFormatRule', class: Google::Apis::SheetsV4::UpdateConditionalFormatRuleRequest, decorator: Google::Apis::SheetsV4::UpdateConditionalFormatRuleRequest::Representation - - property :set_basic_filter, as: 'setBasicFilter', class: Google::Apis::SheetsV4::SetBasicFilterRequest, decorator: Google::Apis::SheetsV4::SetBasicFilterRequest::Representation - - property :merge_cells, as: 'mergeCells', class: Google::Apis::SheetsV4::MergeCellsRequest, decorator: Google::Apis::SheetsV4::MergeCellsRequest::Representation - - property :update_banding, as: 'updateBanding', class: Google::Apis::SheetsV4::UpdateBandingRequest, decorator: Google::Apis::SheetsV4::UpdateBandingRequest::Representation - - property :add_chart, as: 'addChart', class: Google::Apis::SheetsV4::AddChartRequest, decorator: Google::Apis::SheetsV4::AddChartRequest::Representation - - property :delete_conditional_format_rule, as: 'deleteConditionalFormatRule', class: Google::Apis::SheetsV4::DeleteConditionalFormatRuleRequest, decorator: Google::Apis::SheetsV4::DeleteConditionalFormatRuleRequest::Representation - - property :add_banding, as: 'addBanding', class: Google::Apis::SheetsV4::AddBandingRequest, decorator: Google::Apis::SheetsV4::AddBandingRequest::Representation - - property :delete_banding, as: 'deleteBanding', class: Google::Apis::SheetsV4::DeleteBandingRequest, decorator: Google::Apis::SheetsV4::DeleteBandingRequest::Representation - - property :update_chart_spec, as: 'updateChartSpec', class: Google::Apis::SheetsV4::UpdateChartSpecRequest, decorator: Google::Apis::SheetsV4::UpdateChartSpecRequest::Representation - - property :delete_range, as: 'deleteRange', class: Google::Apis::SheetsV4::DeleteRangeRequest, decorator: Google::Apis::SheetsV4::DeleteRangeRequest::Representation - - property :delete_dimension, as: 'deleteDimension', class: Google::Apis::SheetsV4::DeleteDimensionRequest, decorator: Google::Apis::SheetsV4::DeleteDimensionRequest::Representation - - property :delete_embedded_object, as: 'deleteEmbeddedObject', class: Google::Apis::SheetsV4::DeleteEmbeddedObjectRequest, decorator: Google::Apis::SheetsV4::DeleteEmbeddedObjectRequest::Representation - - property :paste_data, as: 'pasteData', class: Google::Apis::SheetsV4::PasteDataRequest, decorator: Google::Apis::SheetsV4::PasteDataRequest::Representation - - property :add_conditional_format_rule, as: 'addConditionalFormatRule', class: Google::Apis::SheetsV4::AddConditionalFormatRuleRequest, decorator: Google::Apis::SheetsV4::AddConditionalFormatRuleRequest::Representation - - property :update_borders, as: 'updateBorders', class: Google::Apis::SheetsV4::UpdateBordersRequest, decorator: Google::Apis::SheetsV4::UpdateBordersRequest::Representation - - property :auto_resize_dimensions, as: 'autoResizeDimensions', class: Google::Apis::SheetsV4::AutoResizeDimensionsRequest, decorator: Google::Apis::SheetsV4::AutoResizeDimensionsRequest::Representation - - property :duplicate_sheet, as: 'duplicateSheet', class: Google::Apis::SheetsV4::DuplicateSheetRequest, decorator: Google::Apis::SheetsV4::DuplicateSheetRequest::Representation - - property :duplicate_filter_view, as: 'duplicateFilterView', class: Google::Apis::SheetsV4::DuplicateFilterViewRequest, decorator: Google::Apis::SheetsV4::DuplicateFilterViewRequest::Representation - - property :cut_paste, as: 'cutPaste', class: Google::Apis::SheetsV4::CutPasteRequest, decorator: Google::Apis::SheetsV4::CutPasteRequest::Representation - - property :append_cells, as: 'appendCells', class: Google::Apis::SheetsV4::AppendCellsRequest, decorator: Google::Apis::SheetsV4::AppendCellsRequest::Representation - - property :add_named_range, as: 'addNamedRange', class: Google::Apis::SheetsV4::AddNamedRangeRequest, decorator: Google::Apis::SheetsV4::AddNamedRangeRequest::Representation - - property :auto_fill, as: 'autoFill', class: Google::Apis::SheetsV4::AutoFillRequest, decorator: Google::Apis::SheetsV4::AutoFillRequest::Representation - - property :move_dimension, as: 'moveDimension', class: Google::Apis::SheetsV4::MoveDimensionRequest, decorator: Google::Apis::SheetsV4::MoveDimensionRequest::Representation - - property :text_to_columns, as: 'textToColumns', class: Google::Apis::SheetsV4::TextToColumnsRequest, decorator: Google::Apis::SheetsV4::TextToColumnsRequest::Representation - - property :insert_dimension, as: 'insertDimension', class: Google::Apis::SheetsV4::InsertDimensionRequest, decorator: Google::Apis::SheetsV4::InsertDimensionRequest::Representation - - property :copy_paste, as: 'copyPaste', class: Google::Apis::SheetsV4::CopyPasteRequest, decorator: Google::Apis::SheetsV4::CopyPasteRequest::Representation + property :data_validation, as: 'dataValidation', class: Google::Apis::SheetsV4::DataValidationRule, decorator: Google::Apis::SheetsV4::DataValidationRule::Representation end end - class BatchGetValuesResponse + class BatchUpdateSpreadsheetRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :value_ranges, as: 'valueRanges', class: Google::Apis::SheetsV4::ValueRange, decorator: Google::Apis::SheetsV4::ValueRange::Representation + property :include_spreadsheet_in_response, as: 'includeSpreadsheetInResponse' + collection :response_ranges, as: 'responseRanges' + property :response_include_grid_data, as: 'responseIncludeGridData' + collection :requests, as: 'requests', class: Google::Apis::SheetsV4::Request, decorator: Google::Apis::SheetsV4::Request::Representation - property :spreadsheet_id, as: 'spreadsheetId' end end - class InsertDimensionRequest + class BasicChartAxis + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :format, as: 'format', class: Google::Apis::SheetsV4::TextFormat, decorator: Google::Apis::SheetsV4::TextFormat::Representation + + property :position, as: 'position' + property :title, as: 'title' + end + end + + class Padding + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :bottom, as: 'bottom' + property :top, as: 'top' + property :left, as: 'left' + property :right, as: 'right' + end + end + + class DeleteDimensionRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - property :inherit_from_before, as: 'inheritFromBefore' property :range, as: 'range', class: Google::Apis::SheetsV4::DimensionRange, decorator: Google::Apis::SheetsV4::DimensionRange::Representation end end - class DeleteEmbeddedObjectRequest + class UpdateChartSpecRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - property :object_id_prop, as: 'objectId' + property :spec, as: 'spec', class: Google::Apis::SheetsV4::ChartSpec, decorator: Google::Apis::SheetsV4::ChartSpec::Representation + + property :chart_id, as: 'chartId' end end - class BandedRange + class DeleteFilterViewRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - property :banded_range_id, as: 'bandedRangeId' - property :row_properties, as: 'rowProperties', class: Google::Apis::SheetsV4::BandingProperties, decorator: Google::Apis::SheetsV4::BandingProperties::Representation + property :filter_id, as: 'filterId' + end + end - property :column_properties, as: 'columnProperties', class: Google::Apis::SheetsV4::BandingProperties, decorator: Google::Apis::SheetsV4::BandingProperties::Representation + class BatchUpdateValuesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :total_updated_columns, as: 'totalUpdatedColumns' + property :spreadsheet_id, as: 'spreadsheetId' + property :total_updated_rows, as: 'totalUpdatedRows' + collection :responses, as: 'responses', class: Google::Apis::SheetsV4::UpdateValuesResponse, decorator: Google::Apis::SheetsV4::UpdateValuesResponse::Representation + + property :total_updated_sheets, as: 'totalUpdatedSheets' + property :total_updated_cells, as: 'totalUpdatedCells' + end + end + + class SortRangeRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :sort_specs, as: 'sortSpecs', class: Google::Apis::SheetsV4::SortSpec, decorator: Google::Apis::SheetsV4::SortSpec::Representation property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation end end - class DeleteConditionalFormatRuleResponse + class MergeCellsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + property :merge_type, as: 'mergeType' + end + end + + class AddProtectedRangeRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :protected_range, as: 'protectedRange', class: Google::Apis::SheetsV4::ProtectedRange, decorator: Google::Apis::SheetsV4::ProtectedRange::Representation + + end + end + + class BatchClearValuesRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :ranges, as: 'ranges' + end + end + + class DuplicateFilterViewResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :filter, as: 'filter', class: Google::Apis::SheetsV4::FilterView, decorator: Google::Apis::SheetsV4::FilterView::Representation + + end + end + + class DuplicateSheetResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :properties, as: 'properties', class: Google::Apis::SheetsV4::SheetProperties, decorator: Google::Apis::SheetsV4::SheetProperties::Representation + + end + end + + class TextToColumnsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :delimiter, as: 'delimiter' + property :source, as: 'source', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + property :delimiter_type, as: 'delimiterType' + end + end + + class ClearBasicFilterRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :sheet_id, as: 'sheetId' + end + end + + class BatchUpdateSpreadsheetResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :replies, as: 'replies', class: Google::Apis::SheetsV4::Response, decorator: Google::Apis::SheetsV4::Response::Representation + + property :updated_spreadsheet, as: 'updatedSpreadsheet', class: Google::Apis::SheetsV4::Spreadsheet, decorator: Google::Apis::SheetsV4::Spreadsheet::Representation + + property :spreadsheet_id, as: 'spreadsheetId' + end + end + + class DeleteBandingRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :banded_range_id, as: 'bandedRangeId' + end + end + + class AppendValuesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :updates, as: 'updates', class: Google::Apis::SheetsV4::UpdateValuesResponse, decorator: Google::Apis::SheetsV4::UpdateValuesResponse::Representation + + property :table_range, as: 'tableRange' + property :spreadsheet_id, as: 'spreadsheetId' + end + end + + class MoveDimensionRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :destination_index, as: 'destinationIndex' + property :source, as: 'source', class: Google::Apis::SheetsV4::DimensionRange, decorator: Google::Apis::SheetsV4::DimensionRange::Representation + + end + end + + class PivotFilterCriteria + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :visible_values, as: 'visibleValues' + end + end + + class AddFilterViewRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :filter, as: 'filter', class: Google::Apis::SheetsV4::FilterView, decorator: Google::Apis::SheetsV4::FilterView::Representation + + end + end + + class AddConditionalFormatRuleRequest # @private class Representation < Google::Apis::Core::JsonRepresentation property :rule, as: 'rule', class: Google::Apis::SheetsV4::ConditionalFormatRule, decorator: Google::Apis::SheetsV4::ConditionalFormatRule::Representation + property :index, as: 'index' + end + end + + class ChartSpec + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :pie_chart, as: 'pieChart', class: Google::Apis::SheetsV4::PieChartSpec, decorator: Google::Apis::SheetsV4::PieChartSpec::Representation + + property :basic_chart, as: 'basicChart', class: Google::Apis::SheetsV4::BasicChartSpec, decorator: Google::Apis::SheetsV4::BasicChartSpec::Representation + + property :hidden_dimension_strategy, as: 'hiddenDimensionStrategy' + property :title, as: 'title' + end + end + + class NumberFormat + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :pattern, as: 'pattern' + property :type, as: 'type' + end + end + + class SheetProperties + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :title, as: 'title' + property :tab_color, as: 'tabColor', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation + + property :index, as: 'index' + property :sheet_id, as: 'sheetId' + property :right_to_left, as: 'rightToLeft' + property :hidden, as: 'hidden' + property :sheet_type, as: 'sheetType' + property :grid_properties, as: 'gridProperties', class: Google::Apis::SheetsV4::GridProperties, decorator: Google::Apis::SheetsV4::GridProperties::Representation + + end + end + + class UpdateDimensionPropertiesRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :fields, as: 'fields' + property :properties, as: 'properties', class: Google::Apis::SheetsV4::DimensionProperties, decorator: Google::Apis::SheetsV4::DimensionProperties::Representation + + property :range, as: 'range', class: Google::Apis::SheetsV4::DimensionRange, decorator: Google::Apis::SheetsV4::DimensionRange::Representation + + end + end + + class SourceAndDestination + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :fill_length, as: 'fillLength' + property :source, as: 'source', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + property :dimension, as: 'dimension' + end + end + + class FilterView + # @private + class Representation < Google::Apis::Core::JsonRepresentation + hash :criteria, as: 'criteria', class: Google::Apis::SheetsV4::FilterCriteria, decorator: Google::Apis::SheetsV4::FilterCriteria::Representation + + property :title, as: 'title' + property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + collection :sort_specs, as: 'sortSpecs', class: Google::Apis::SheetsV4::SortSpec, decorator: Google::Apis::SheetsV4::SortSpec::Representation + + property :named_range_id, as: 'namedRangeId' + property :filter_view_id, as: 'filterViewId' + end + end + + class BandingProperties + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :second_band_color, as: 'secondBandColor', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation + + property :footer_color, as: 'footerColor', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation + + property :header_color, as: 'headerColor', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation + + property :first_band_color, as: 'firstBandColor', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation + + end + end + + class AddProtectedRangeResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :protected_range, as: 'protectedRange', class: Google::Apis::SheetsV4::ProtectedRange, decorator: Google::Apis::SheetsV4::ProtectedRange::Representation + + end + end + + class BasicFilter + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + hash :criteria, as: 'criteria', class: Google::Apis::SheetsV4::FilterCriteria, decorator: Google::Apis::SheetsV4::FilterCriteria::Representation + + collection :sort_specs, as: 'sortSpecs', class: Google::Apis::SheetsV4::SortSpec, decorator: Google::Apis::SheetsV4::SortSpec::Representation + end end end diff --git a/generated/google/apis/sheets_v4/service.rb b/generated/google/apis/sheets_v4/service.rb index 456e29bdf..a50c6a8c0 100644 --- a/generated/google/apis/sheets_v4/service.rb +++ b/generated/google/apis/sheets_v4/service.rb @@ -46,36 +46,6 @@ module Google super('https://sheets.googleapis.com/', '') end - # Creates a spreadsheet, returning the newly created spreadsheet. - # @param [Google::Apis::SheetsV4::Spreadsheet] spreadsheet_object - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SheetsV4::Spreadsheet] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SheetsV4::Spreadsheet] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_spreadsheet(spreadsheet_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v4/spreadsheets', options) - command.request_representation = Google::Apis::SheetsV4::Spreadsheet::Representation - command.request_object = spreadsheet_object - command.response_representation = Google::Apis::SheetsV4::Spreadsheet::Representation - command.response_class = Google::Apis::SheetsV4::Spreadsheet - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - # Returns the spreadsheet at the given ID. # The caller must specify the spreadsheet ID. # By default, data within grids will not be returned. @@ -99,11 +69,11 @@ module Google # @param [Boolean] include_grid_data # True if grid data should be returned. # This parameter is ignored if a field mask was set in the request. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -116,15 +86,45 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_spreadsheet(spreadsheet_id, ranges: nil, include_grid_data: nil, quota_user: nil, fields: nil, options: nil, &block) + def get_spreadsheet(spreadsheet_id, ranges: nil, include_grid_data: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v4/spreadsheets/{spreadsheetId}', options) command.response_representation = Google::Apis::SheetsV4::Spreadsheet::Representation command.response_class = Google::Apis::SheetsV4::Spreadsheet command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? command.query['ranges'] = ranges unless ranges.nil? command.query['includeGridData'] = include_grid_data unless include_grid_data.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a spreadsheet, returning the newly created spreadsheet. + # @param [Google::Apis::SheetsV4::Spreadsheet] spreadsheet_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SheetsV4::Spreadsheet] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SheetsV4::Spreadsheet] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_spreadsheet(spreadsheet_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v4/spreadsheets', options) + command.request_representation = Google::Apis::SheetsV4::Spreadsheet::Representation + command.request_object = spreadsheet_object + command.response_representation = Google::Apis::SheetsV4::Spreadsheet::Representation + command.response_class = Google::Apis::SheetsV4::Spreadsheet + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -147,11 +147,11 @@ module Google # @param [String] spreadsheet_id # The spreadsheet to apply the updates to. # @param [Google::Apis::SheetsV4::BatchUpdateSpreadsheetRequest] batch_update_spreadsheet_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -164,54 +164,52 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def batch_update_spreadsheet(spreadsheet_id, batch_update_spreadsheet_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def batch_update_spreadsheet(spreadsheet_id, batch_update_spreadsheet_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}:batchUpdate', options) command.request_representation = Google::Apis::SheetsV4::BatchUpdateSpreadsheetRequest::Representation command.request_object = batch_update_spreadsheet_request_object command.response_representation = Google::Apis::SheetsV4::BatchUpdateSpreadsheetResponse::Representation command.response_class = Google::Apis::SheetsV4::BatchUpdateSpreadsheetResponse command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end - # Clears values from a spreadsheet. - # The caller must specify the spreadsheet ID and range. - # Only values are cleared -- all other properties of the cell (such as - # formatting, data validation, etc..) are kept. + # Copies a single sheet from a spreadsheet to another spreadsheet. + # Returns the properties of the newly created sheet. # @param [String] spreadsheet_id - # The ID of the spreadsheet to update. - # @param [String] range - # The A1 notation of the values to clear. - # @param [Google::Apis::SheetsV4::ClearValuesRequest] clear_values_request_object + # The ID of the spreadsheet containing the sheet to copy. + # @param [Fixnum] sheet_id + # The ID of the sheet to copy. + # @param [Google::Apis::SheetsV4::CopySheetToAnotherSpreadsheetRequest] copy_sheet_to_another_spreadsheet_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SheetsV4::ClearValuesResponse] parsed result object + # @yieldparam result [Google::Apis::SheetsV4::SheetProperties] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::SheetsV4::ClearValuesResponse] + # @return [Google::Apis::SheetsV4::SheetProperties] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def clear_values(spreadsheet_id, range, clear_values_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}/values/{range}:clear', options) - command.request_representation = Google::Apis::SheetsV4::ClearValuesRequest::Representation - command.request_object = clear_values_request_object - command.response_representation = Google::Apis::SheetsV4::ClearValuesResponse::Representation - command.response_class = Google::Apis::SheetsV4::ClearValuesResponse + def copy_spreadsheet(spreadsheet_id, sheet_id, copy_sheet_to_another_spreadsheet_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo', options) + command.request_representation = Google::Apis::SheetsV4::CopySheetToAnotherSpreadsheetRequest::Representation + command.request_object = copy_sheet_to_another_spreadsheet_request_object + command.response_representation = Google::Apis::SheetsV4::SheetProperties::Representation + command.response_class = Google::Apis::SheetsV4::SheetProperties command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? - command.params['range'] = range unless range.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? + command.params['sheetId'] = sheet_id unless sheet_id.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -219,8 +217,6 @@ module Google # The caller must specify the spreadsheet ID and one or more ranges. # @param [String] spreadsheet_id # The ID of the spreadsheet to retrieve data from. - # @param [Array, String] ranges - # The A1 notation of the values to retrieve. # @param [String] value_render_option # How values should be represented in the output. # The default render option is ValueRenderOption.FORMATTED_VALUE. @@ -229,6 +225,8 @@ module Google # This is ignored if value_render_option is # FORMATTED_VALUE. # The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER]. + # @param [Array, String] ranges + # The A1 notation of the values to retrieve. # @param [String] major_dimension # The major dimension that results should use. # For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, @@ -236,11 +234,11 @@ module Google # `[[1,2],[3,4]]`, # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return # `[[1,3],[2,4]]`. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -253,53 +251,162 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def batch_get_spreadsheet_values(spreadsheet_id, ranges: nil, value_render_option: nil, date_time_render_option: nil, major_dimension: nil, quota_user: nil, fields: nil, options: nil, &block) + def batch_get_spreadsheet_values(spreadsheet_id, value_render_option: nil, date_time_render_option: nil, ranges: nil, major_dimension: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v4/spreadsheets/{spreadsheetId}/values:batchGet', options) command.response_representation = Google::Apis::SheetsV4::BatchGetValuesResponse::Representation command.response_class = Google::Apis::SheetsV4::BatchGetValuesResponse command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? - command.query['ranges'] = ranges unless ranges.nil? command.query['valueRenderOption'] = value_render_option unless value_render_option.nil? command.query['dateTimeRenderOption'] = date_time_render_option unless date_time_render_option.nil? + command.query['ranges'] = ranges unless ranges.nil? command.query['majorDimension'] = major_dimension unless major_dimension.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end - # Sets values in one or more ranges of a spreadsheet. - # The caller must specify the spreadsheet ID, - # a valueInputOption, and one or more - # ValueRanges. + # Clears values from a spreadsheet. + # The caller must specify the spreadsheet ID and range. + # Only values are cleared -- all other properties of the cell (such as + # formatting, data validation, etc..) are kept. # @param [String] spreadsheet_id # The ID of the spreadsheet to update. - # @param [Google::Apis::SheetsV4::BatchUpdateValuesRequest] batch_update_values_request_object + # @param [String] range + # The A1 notation of the values to clear. + # @param [Google::Apis::SheetsV4::ClearValuesRequest] clear_values_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SheetsV4::BatchUpdateValuesResponse] parsed result object + # @yieldparam result [Google::Apis::SheetsV4::ClearValuesResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::SheetsV4::BatchUpdateValuesResponse] + # @return [Google::Apis::SheetsV4::ClearValuesResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def batch_update_values(spreadsheet_id, batch_update_values_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}/values:batchUpdate', options) - command.request_representation = Google::Apis::SheetsV4::BatchUpdateValuesRequest::Representation - command.request_object = batch_update_values_request_object - command.response_representation = Google::Apis::SheetsV4::BatchUpdateValuesResponse::Representation - command.response_class = Google::Apis::SheetsV4::BatchUpdateValuesResponse + def clear_values(spreadsheet_id, range, clear_values_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}/values/{range}:clear', options) + command.request_representation = Google::Apis::SheetsV4::ClearValuesRequest::Representation + command.request_object = clear_values_request_object + command.response_representation = Google::Apis::SheetsV4::ClearValuesResponse::Representation + command.response_class = Google::Apis::SheetsV4::ClearValuesResponse command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? + command.params['range'] = range unless range.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Appends values to a spreadsheet. The input range is used to search for + # existing data and find a "table" within that range. Values will be + # appended to the next row of the table, starting with the first column of + # the table. See the + # [guide](/sheets/guides/values#appending_values) + # and + # [sample code](/sheets/samples/writing#append_values) + # for specific details of how tables are detected and data is appended. + # The caller must specify the spreadsheet ID, range, and + # a valueInputOption. The `valueInputOption` only + # controls how the input data will be added to the sheet (column-wise or + # row-wise), it does not influence what cell the data starts being written + # to. + # @param [String] spreadsheet_id + # The ID of the spreadsheet to update. + # @param [String] range + # The A1 notation of a range to search for a logical table of data. + # Values will be appended after the last row of the table. + # @param [Google::Apis::SheetsV4::ValueRange] value_range_object + # @param [String] value_input_option + # How the input data should be interpreted. + # @param [String] response_date_time_render_option + # Determines how dates, times, and durations in the response should be + # rendered. This is ignored if response_value_render_option is + # FORMATTED_VALUE. + # The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER]. + # @param [Boolean] include_values_in_response + # Determines if the update response should include the values + # of the cells that were appended. By default, responses + # do not include the updated values. + # @param [String] response_value_render_option + # Determines how values in the response should be rendered. + # The default render option is ValueRenderOption.FORMATTED_VALUE. + # @param [String] insert_data_option + # How the input data should be inserted. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SheetsV4::AppendValuesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SheetsV4::AppendValuesResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def append_spreadsheet_value(spreadsheet_id, range, value_range_object = nil, value_input_option: nil, response_date_time_render_option: nil, include_values_in_response: nil, response_value_render_option: nil, insert_data_option: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}/values/{range}:append', options) + command.request_representation = Google::Apis::SheetsV4::ValueRange::Representation + command.request_object = value_range_object + command.response_representation = Google::Apis::SheetsV4::AppendValuesResponse::Representation + command.response_class = Google::Apis::SheetsV4::AppendValuesResponse + command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? + command.params['range'] = range unless range.nil? + command.query['valueInputOption'] = value_input_option unless value_input_option.nil? + command.query['responseDateTimeRenderOption'] = response_date_time_render_option unless response_date_time_render_option.nil? + command.query['includeValuesInResponse'] = include_values_in_response unless include_values_in_response.nil? + command.query['responseValueRenderOption'] = response_value_render_option unless response_value_render_option.nil? + command.query['insertDataOption'] = insert_data_option unless insert_data_option.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Clears one or more ranges of values from a spreadsheet. + # The caller must specify the spreadsheet ID and one or more ranges. + # Only values are cleared -- all other properties of the cell (such as + # formatting, data validation, etc..) are kept. + # @param [String] spreadsheet_id + # The ID of the spreadsheet to update. + # @param [Google::Apis::SheetsV4::BatchClearValuesRequest] batch_clear_values_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SheetsV4::BatchClearValuesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SheetsV4::BatchClearValuesResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def batch_clear_values(spreadsheet_id, batch_clear_values_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}/values:batchClear', options) + command.request_representation = Google::Apis::SheetsV4::BatchClearValuesRequest::Representation + command.request_object = batch_clear_values_request_object + command.response_representation = Google::Apis::SheetsV4::BatchClearValuesResponse::Representation + command.response_class = Google::Apis::SheetsV4::BatchClearValuesResponse + command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -324,11 +431,11 @@ module Google # `[[1,2],[3,4]]`, # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return # `[[1,3],[2,4]]`. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -341,7 +448,7 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_spreadsheet_values(spreadsheet_id, range, value_render_option: nil, date_time_render_option: nil, major_dimension: nil, quota_user: nil, fields: nil, options: nil, &block) + def get_spreadsheet_values(spreadsheet_id, range, value_render_option: nil, date_time_render_option: nil, major_dimension: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v4/spreadsheets/{spreadsheetId}/values/{range}', options) command.response_representation = Google::Apis::SheetsV4::ValueRange::Representation command.response_class = Google::Apis::SheetsV4::ValueRange @@ -350,78 +457,8 @@ module Google command.query['valueRenderOption'] = value_render_option unless value_render_option.nil? command.query['dateTimeRenderOption'] = date_time_render_option unless date_time_render_option.nil? command.query['majorDimension'] = major_dimension unless major_dimension.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Appends values to a spreadsheet. The input range is used to search for - # existing data and find a "table" within that range. Values will be - # appended to the next row of the table, starting with the first column of - # the table. See the - # [guide](/sheets/guides/values#appending_values) - # and - # [sample code](/sheets/samples/writing#append_values) - # for specific details of how tables are detected and data is appended. - # The caller must specify the spreadsheet ID, range, and - # a valueInputOption. The `valueInputOption` only - # controls how the input data will be added to the sheet (column-wise or - # row-wise), it does not influence what cell the data starts being written - # to. - # @param [String] spreadsheet_id - # The ID of the spreadsheet to update. - # @param [String] range - # The A1 notation of a range to search for a logical table of data. - # Values will be appended after the last row of the table. - # @param [Google::Apis::SheetsV4::ValueRange] value_range_object - # @param [String] response_value_render_option - # Determines how values in the response should be rendered. - # The default render option is ValueRenderOption.FORMATTED_VALUE. - # @param [String] value_input_option - # How the input data should be interpreted. - # @param [String] response_date_time_render_option - # Determines how dates, times, and durations in the response should be - # rendered. This is ignored if response_value_render_option is - # FORMATTED_VALUE. - # The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER]. - # @param [Boolean] include_values_in_response - # Determines if the update response should include the values - # of the cells that were appended. By default, responses - # do not include the updated values. - # @param [String] insert_data_option - # How the input data should be inserted. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SheetsV4::AppendValuesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SheetsV4::AppendValuesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def append_spreadsheet_value(spreadsheet_id, range, value_range_object = nil, response_value_render_option: nil, value_input_option: nil, response_date_time_render_option: nil, include_values_in_response: nil, insert_data_option: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}/values/{range}:append', options) - command.request_representation = Google::Apis::SheetsV4::ValueRange::Representation - command.request_object = value_range_object - command.response_representation = Google::Apis::SheetsV4::AppendValuesResponse::Representation - command.response_class = Google::Apis::SheetsV4::AppendValuesResponse - command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? - command.params['range'] = range unless range.nil? - command.query['responseValueRenderOption'] = response_value_render_option unless response_value_render_option.nil? - command.query['valueInputOption'] = value_input_option unless value_input_option.nil? - command.query['responseDateTimeRenderOption'] = response_date_time_render_option unless response_date_time_render_option.nil? - command.query['includeValuesInResponse'] = include_values_in_response unless include_values_in_response.nil? - command.query['insertDataOption'] = insert_data_option unless insert_data_option.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -433,9 +470,6 @@ module Google # @param [String] range # The A1 notation of the values to update. # @param [Google::Apis::SheetsV4::ValueRange] value_range_object - # @param [String] response_value_render_option - # Determines how values in the response should be rendered. - # The default render option is ValueRenderOption.FORMATTED_VALUE. # @param [String] value_input_option # How the input data should be interpreted. # @param [String] response_date_time_render_option @@ -450,11 +484,14 @@ module Google # If the range to write was larger than than the range actually written, # the response will include all values in the requested range (excluding # trailing empty rows and columns). + # @param [String] response_value_render_option + # Determines how values in the response should be rendered. + # The default render option is ValueRenderOption.FORMATTED_VALUE. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -467,7 +504,7 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_spreadsheet_value(spreadsheet_id, range, value_range_object = nil, response_value_render_option: nil, value_input_option: nil, response_date_time_render_option: nil, include_values_in_response: nil, quota_user: nil, fields: nil, options: nil, &block) + def update_spreadsheet_value(spreadsheet_id, range, value_range_object = nil, value_input_option: nil, response_date_time_render_option: nil, include_values_in_response: nil, response_value_render_option: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:put, 'v4/spreadsheets/{spreadsheetId}/values/{range}', options) command.request_representation = Google::Apis::SheetsV4::ValueRange::Representation command.request_object = value_range_object @@ -475,85 +512,48 @@ module Google command.response_class = Google::Apis::SheetsV4::UpdateValuesResponse command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? command.params['range'] = range unless range.nil? - command.query['responseValueRenderOption'] = response_value_render_option unless response_value_render_option.nil? command.query['valueInputOption'] = value_input_option unless value_input_option.nil? command.query['responseDateTimeRenderOption'] = response_date_time_render_option unless response_date_time_render_option.nil? command.query['includeValuesInResponse'] = include_values_in_response unless include_values_in_response.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['responseValueRenderOption'] = response_value_render_option unless response_value_render_option.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end - # Clears one or more ranges of values from a spreadsheet. - # The caller must specify the spreadsheet ID and one or more ranges. - # Only values are cleared -- all other properties of the cell (such as - # formatting, data validation, etc..) are kept. + # Sets values in one or more ranges of a spreadsheet. + # The caller must specify the spreadsheet ID, + # a valueInputOption, and one or more + # ValueRanges. # @param [String] spreadsheet_id # The ID of the spreadsheet to update. - # @param [Google::Apis::SheetsV4::BatchClearValuesRequest] batch_clear_values_request_object + # @param [Google::Apis::SheetsV4::BatchUpdateValuesRequest] batch_update_values_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SheetsV4::BatchClearValuesResponse] parsed result object + # @yieldparam result [Google::Apis::SheetsV4::BatchUpdateValuesResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::SheetsV4::BatchClearValuesResponse] + # @return [Google::Apis::SheetsV4::BatchUpdateValuesResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def batch_clear_values(spreadsheet_id, batch_clear_values_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}/values:batchClear', options) - command.request_representation = Google::Apis::SheetsV4::BatchClearValuesRequest::Representation - command.request_object = batch_clear_values_request_object - command.response_representation = Google::Apis::SheetsV4::BatchClearValuesResponse::Representation - command.response_class = Google::Apis::SheetsV4::BatchClearValuesResponse + def batch_update_values(spreadsheet_id, batch_update_values_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}/values:batchUpdate', options) + command.request_representation = Google::Apis::SheetsV4::BatchUpdateValuesRequest::Representation + command.request_object = batch_update_values_request_object + command.response_representation = Google::Apis::SheetsV4::BatchUpdateValuesResponse::Representation + command.response_class = Google::Apis::SheetsV4::BatchUpdateValuesResponse command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Copies a single sheet from a spreadsheet to another spreadsheet. - # Returns the properties of the newly created sheet. - # @param [String] spreadsheet_id - # The ID of the spreadsheet containing the sheet to copy. - # @param [Fixnum] sheet_id - # The ID of the sheet to copy. - # @param [Google::Apis::SheetsV4::CopySheetToAnotherSpreadsheetRequest] copy_sheet_to_another_spreadsheet_request_object - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SheetsV4::SheetProperties] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SheetsV4::SheetProperties] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def copy_spreadsheet(spreadsheet_id, sheet_id, copy_sheet_to_another_spreadsheet_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo', options) - command.request_representation = Google::Apis::SheetsV4::CopySheetToAnotherSpreadsheetRequest::Representation - command.request_object = copy_sheet_to_another_spreadsheet_request_object - command.response_representation = Google::Apis::SheetsV4::SheetProperties::Representation - command.response_class = Google::Apis::SheetsV4::SheetProperties - command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? - command.params['sheetId'] = sheet_id unless sheet_id.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end diff --git a/script/generate b/script/generate index bc461bc1a..8ecdd4f5f 100755 --- a/script/generate +++ b/script/generate @@ -48,6 +48,7 @@ API_IDS=(adexchangebuyer:v1.4 \ dfareporting:v2.6 \ discovery:v1 \ dns:v1 \ + dns:v2beta1 \ doubleclickbidmanager:v1 \ doubleclicksearch:v2 \ drive:v2 \