2016-01-29 22:32:46 +00:00
|
|
|
# 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 CloudbuildV1
|
|
|
|
|
|
|
|
class Status
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
2016-02-25 23:16:53 +00:00
|
|
|
|
|
|
|
include Google::Apis::Core::JsonObjectSupport
|
2016-01-29 22:32:46 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
class BuildOperationMetadata
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
2016-02-25 23:16:53 +00:00
|
|
|
|
|
|
|
include Google::Apis::Core::JsonObjectSupport
|
2016-01-29 22:32:46 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
class Source
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
2016-02-25 23:16:53 +00:00
|
|
|
|
|
|
|
include Google::Apis::Core::JsonObjectSupport
|
2016-01-29 22:32:46 +00:00
|
|
|
end
|
|
|
|
|
2016-06-30 21:17:37 +00:00
|
|
|
class SourceProvenance
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
|
|
|
|
|
|
include Google::Apis::Core::JsonObjectSupport
|
|
|
|
end
|
|
|
|
|
2016-01-29 22:32:46 +00:00
|
|
|
class Operation
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
2016-02-25 23:16:53 +00:00
|
|
|
|
|
|
|
include Google::Apis::Core::JsonObjectSupport
|
2016-01-29 22:32:46 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
class BuiltImage
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
2016-02-25 23:16:53 +00:00
|
|
|
|
|
|
|
include Google::Apis::Core::JsonObjectSupport
|
2016-01-29 22:32:46 +00:00
|
|
|
end
|
|
|
|
|
2016-06-30 21:17:37 +00:00
|
|
|
class HashProp
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
|
|
|
|
|
|
include Google::Apis::Core::JsonObjectSupport
|
|
|
|
end
|
|
|
|
|
2016-01-29 22:32:46 +00:00
|
|
|
class StorageSource
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
2016-02-25 23:16:53 +00:00
|
|
|
|
|
|
|
include Google::Apis::Core::JsonObjectSupport
|
2016-01-29 22:32:46 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
class Results
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
2016-02-25 23:16:53 +00:00
|
|
|
|
|
|
|
include Google::Apis::Core::JsonObjectSupport
|
2016-01-29 22:32:46 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
class Build
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
2016-02-25 23:16:53 +00:00
|
|
|
|
|
|
|
include Google::Apis::Core::JsonObjectSupport
|
2016-01-29 22:32:46 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
class CancelBuildRequest
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
2016-02-25 23:16:53 +00:00
|
|
|
|
|
|
|
include Google::Apis::Core::JsonObjectSupport
|
2016-01-29 22:32:46 +00:00
|
|
|
end
|
|
|
|
|
2016-06-30 21:17:37 +00:00
|
|
|
class FileHashes
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
|
|
|
|
|
|
include Google::Apis::Core::JsonObjectSupport
|
|
|
|
end
|
|
|
|
|
2016-01-29 22:32:46 +00:00
|
|
|
class ListOperationsResponse
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
2016-02-25 23:16:53 +00:00
|
|
|
|
|
|
|
include Google::Apis::Core::JsonObjectSupport
|
2016-01-29 22:32:46 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
class BuildStep
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
2016-02-25 23:16:53 +00:00
|
|
|
|
|
|
|
include Google::Apis::Core::JsonObjectSupport
|
2016-01-29 22:32:46 +00:00
|
|
|
end
|
|
|
|
|
2016-06-30 21:17:37 +00:00
|
|
|
class BuildOptions
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
|
|
|
|
|
|
include Google::Apis::Core::JsonObjectSupport
|
|
|
|
end
|
|
|
|
|
2016-01-29 22:32:46 +00:00
|
|
|
class ListBuildsResponse
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
2016-02-25 23:16:53 +00:00
|
|
|
|
|
|
|
include Google::Apis::Core::JsonObjectSupport
|
2016-01-29 22:32:46 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
class Status
|
|
|
|
# @private
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
|
|
property :code, as: 'code'
|
|
|
|
collection :details, as: 'details'
|
|
|
|
property :message, as: 'message'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
class BuildOperationMetadata
|
|
|
|
# @private
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
|
|
property :build, as: 'build', class: Google::Apis::CloudbuildV1::Build, decorator: Google::Apis::CloudbuildV1::Build::Representation
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
class Source
|
|
|
|
# @private
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
|
|
property :storage_source, as: 'storageSource', class: Google::Apis::CloudbuildV1::StorageSource, decorator: Google::Apis::CloudbuildV1::StorageSource::Representation
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2016-06-30 21:17:37 +00:00
|
|
|
class SourceProvenance
|
|
|
|
# @private
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
|
|
hash :file_hashes, as: 'fileHashes', class: Google::Apis::CloudbuildV1::FileHashes, decorator: Google::Apis::CloudbuildV1::FileHashes::Representation
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2016-01-29 22:32:46 +00:00
|
|
|
class Operation
|
|
|
|
# @private
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
|
|
property :error, as: 'error', class: Google::Apis::CloudbuildV1::Status, decorator: Google::Apis::CloudbuildV1::Status::Representation
|
|
|
|
|
|
|
|
property :done, as: 'done'
|
|
|
|
hash :metadata, as: 'metadata'
|
2016-05-16 16:49:15 +00:00
|
|
|
hash :response, as: 'response'
|
2016-01-29 22:32:46 +00:00
|
|
|
property :name, as: 'name'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
class BuiltImage
|
|
|
|
# @private
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
|
|
property :digest, as: 'digest'
|
|
|
|
property :name, as: 'name'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2016-06-30 21:17:37 +00:00
|
|
|
class HashProp
|
|
|
|
# @private
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
|
|
property :value, :base64 => true, as: 'value'
|
|
|
|
property :type, as: 'type'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2016-01-29 22:32:46 +00:00
|
|
|
class StorageSource
|
|
|
|
# @private
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
|
|
property :bucket, as: 'bucket'
|
2016-05-16 16:49:15 +00:00
|
|
|
property :generation, as: 'generation'
|
2016-01-29 22:32:46 +00:00
|
|
|
property :object, as: 'object'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
class Results
|
|
|
|
# @private
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
|
|
collection :images, as: 'images', class: Google::Apis::CloudbuildV1::BuiltImage, decorator: Google::Apis::CloudbuildV1::BuiltImage::Representation
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
class Build
|
|
|
|
# @private
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
|
|
property :id, as: 'id'
|
2016-06-30 21:17:37 +00:00
|
|
|
property :source_provenance, as: 'sourceProvenance', class: Google::Apis::CloudbuildV1::SourceProvenance, decorator: Google::Apis::CloudbuildV1::SourceProvenance::Representation
|
|
|
|
|
2016-01-29 22:32:46 +00:00
|
|
|
property :results, as: 'results', class: Google::Apis::CloudbuildV1::Results, decorator: Google::Apis::CloudbuildV1::Results::Representation
|
|
|
|
|
|
|
|
property :status, as: 'status'
|
2016-06-30 21:17:37 +00:00
|
|
|
property :options, as: 'options', class: Google::Apis::CloudbuildV1::BuildOptions, decorator: Google::Apis::CloudbuildV1::BuildOptions::Representation
|
|
|
|
|
2016-01-29 22:32:46 +00:00
|
|
|
property :finish_time, as: 'finishTime'
|
|
|
|
property :timeout, as: 'timeout'
|
|
|
|
collection :steps, as: 'steps', class: Google::Apis::CloudbuildV1::BuildStep, decorator: Google::Apis::CloudbuildV1::BuildStep::Representation
|
|
|
|
|
|
|
|
property :source, as: 'source', class: Google::Apis::CloudbuildV1::Source, decorator: Google::Apis::CloudbuildV1::Source::Representation
|
|
|
|
|
|
|
|
property :create_time, as: 'createTime'
|
2016-05-16 16:49:15 +00:00
|
|
|
property :status_detail, as: 'statusDetail'
|
2016-01-29 22:32:46 +00:00
|
|
|
collection :images, as: 'images'
|
|
|
|
property :start_time, as: 'startTime'
|
|
|
|
property :logs_bucket, as: 'logsBucket'
|
|
|
|
property :project_id, as: 'projectId'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
class CancelBuildRequest
|
|
|
|
# @private
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2016-06-30 21:17:37 +00:00
|
|
|
class FileHashes
|
|
|
|
# @private
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
|
|
collection :file_hash, as: 'fileHash', class: Google::Apis::CloudbuildV1::HashProp, decorator: Google::Apis::CloudbuildV1::HashProp::Representation
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2016-01-29 22:32:46 +00:00
|
|
|
class ListOperationsResponse
|
|
|
|
# @private
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
|
|
property :next_page_token, as: 'nextPageToken'
|
|
|
|
collection :operations, as: 'operations', class: Google::Apis::CloudbuildV1::Operation, decorator: Google::Apis::CloudbuildV1::Operation::Representation
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
class BuildStep
|
|
|
|
# @private
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
|
|
collection :args, as: 'args'
|
|
|
|
property :dir, as: 'dir'
|
|
|
|
property :name, as: 'name'
|
2016-05-16 16:49:15 +00:00
|
|
|
collection :env, as: 'env'
|
2016-01-29 22:32:46 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2016-06-30 21:17:37 +00:00
|
|
|
class BuildOptions
|
|
|
|
# @private
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
|
|
collection :source_provenance_hash, as: 'sourceProvenanceHash'
|
|
|
|
property :requested_verify_option, as: 'requestedVerifyOption'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2016-01-29 22:32:46 +00:00
|
|
|
class ListBuildsResponse
|
|
|
|
# @private
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
|
|
property :next_page_token, as: 'nextPageToken'
|
|
|
|
collection :builds, as: 'builds', class: Google::Apis::CloudbuildV1::Build, decorator: Google::Apis::CloudbuildV1::Build::Representation
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|