diff --git a/generated/google/apis/bigquery_v2.rb b/generated/google/apis/bigquery_v2.rb index b59ef9f07..fee4c7889 100644 --- a/generated/google/apis/bigquery_v2.rb +++ b/generated/google/apis/bigquery_v2.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/bigquery/ module BigqueryV2 VERSION = 'V2' - REVISION = '20190501' + REVISION = '20190510' # View and manage your data in Google BigQuery AUTH_BIGQUERY = 'https://www.googleapis.com/auth/bigquery' diff --git a/generated/google/apis/bigquery_v2/classes.rb b/generated/google/apis/bigquery_v2/classes.rb index 312d18a29..c8d83f2b0 100644 --- a/generated/google/apis/bigquery_v2/classes.rb +++ b/generated/google/apis/bigquery_v2/classes.rb @@ -22,6 +22,75 @@ module Google module Apis module BigqueryV2 + # Aggregate metrics for classification/classifier models. For multi-class + # models, the metrics are either macro-averaged or micro-averaged. When + # macro-averaged, the metrics are calculated for each label and then an + # unweighted average is taken of those values. When micro-averaged, the + # metric is calculated globally by counting the total number of correctly + # predicted rows. + class AggregateClassificationMetrics + include Google::Apis::Core::Hashable + + # Accuracy is the fraction of predictions given the correct label. For + # multiclass this is a micro-averaged metric. + # Corresponds to the JSON property `accuracy` + # @return [Float] + attr_accessor :accuracy + + # The F1 score is an average of recall and precision. For multiclass + # this is a macro-averaged metric. + # Corresponds to the JSON property `f1Score` + # @return [Float] + attr_accessor :f1_score + + # Logarithmic Loss. For multiclass this is a macro-averaged metric. + # Corresponds to the JSON property `logLoss` + # @return [Float] + attr_accessor :log_loss + + # Precision is the fraction of actual positive predictions that had + # positive actual labels. For multiclass this is a macro-averaged + # metric treating each class as a binary classifier. + # Corresponds to the JSON property `precision` + # @return [Float] + attr_accessor :precision + + # Recall is the fraction of actual positive labels that were given a + # positive prediction. For multiclass this is a macro-averaged metric. + # Corresponds to the JSON property `recall` + # @return [Float] + attr_accessor :recall + + # Area Under a ROC Curve. For multiclass this is a macro-averaged + # metric. + # Corresponds to the JSON property `rocAuc` + # @return [Float] + attr_accessor :roc_auc + + # Threshold at which the metrics are computed. For binary + # classification models this is the positive class threshold. + # For multi-class classfication models this is the confidence + # threshold. + # Corresponds to the JSON property `threshold` + # @return [Float] + attr_accessor :threshold + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @accuracy = args[:accuracy] if args.key?(:accuracy) + @f1_score = args[:f1_score] if args.key?(:f1_score) + @log_loss = args[:log_loss] if args.key?(:log_loss) + @precision = args[:precision] if args.key?(:precision) + @recall = args[:recall] if args.key?(:recall) + @roc_auc = args[:roc_auc] if args.key?(:roc_auc) + @threshold = args[:threshold] if args.key?(:threshold) + end + end + # class BigQueryModelTraining include Google::Apis::Core::Hashable @@ -223,6 +292,91 @@ module Google end end + # Evaluation metrics for binary classification/classifier models. + class BinaryClassificationMetrics + include Google::Apis::Core::Hashable + + # Aggregate metrics for classification/classifier models. For multi-class + # models, the metrics are either macro-averaged or micro-averaged. When + # macro-averaged, the metrics are calculated for each label and then an + # unweighted average is taken of those values. When micro-averaged, the + # metric is calculated globally by counting the total number of correctly + # predicted rows. + # Corresponds to the JSON property `aggregateClassificationMetrics` + # @return [Google::Apis::BigqueryV2::AggregateClassificationMetrics] + attr_accessor :aggregate_classification_metrics + + # Binary confusion matrix at multiple thresholds. + # Corresponds to the JSON property `binaryConfusionMatrixList` + # @return [Array] + attr_accessor :binary_confusion_matrix_list + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @aggregate_classification_metrics = args[:aggregate_classification_metrics] if args.key?(:aggregate_classification_metrics) + @binary_confusion_matrix_list = args[:binary_confusion_matrix_list] if args.key?(:binary_confusion_matrix_list) + end + end + + # Confusion matrix for binary classification models. + class BinaryConfusionMatrix + include Google::Apis::Core::Hashable + + # Number of false samples predicted as false. + # Corresponds to the JSON property `falseNegatives` + # @return [Fixnum] + attr_accessor :false_negatives + + # Number of false samples predicted as true. + # Corresponds to the JSON property `falsePositives` + # @return [Fixnum] + attr_accessor :false_positives + + # Threshold value used when computing each of the following metric. + # Corresponds to the JSON property `positiveClassThreshold` + # @return [Float] + attr_accessor :positive_class_threshold + + # Aggregate precision. + # Corresponds to the JSON property `precision` + # @return [Float] + attr_accessor :precision + + # Aggregate recall. + # Corresponds to the JSON property `recall` + # @return [Float] + attr_accessor :recall + + # Number of true samples predicted as false. + # Corresponds to the JSON property `trueNegatives` + # @return [Fixnum] + attr_accessor :true_negatives + + # Number of true samples predicted as true. + # Corresponds to the JSON property `truePositives` + # @return [Fixnum] + attr_accessor :true_positives + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @false_negatives = args[:false_negatives] if args.key?(:false_negatives) + @false_positives = args[:false_positives] if args.key?(:false_positives) + @positive_class_threshold = args[:positive_class_threshold] if args.key?(:positive_class_threshold) + @precision = args[:precision] if args.key?(:precision) + @recall = args[:recall] if args.key?(:recall) + @true_negatives = args[:true_negatives] if args.key?(:true_negatives) + @true_positives = args[:true_positives] if args.key?(:true_positives) + end + end + # class BqmlIterationResult include Google::Apis::Core::Hashable @@ -389,6 +543,38 @@ module Google end end + # Information about a single cluster for clustering model. + class ClusterInfo + include Google::Apis::Core::Hashable + + # Centroid id. + # Corresponds to the JSON property `centroidId` + # @return [Fixnum] + attr_accessor :centroid_id + + # Cluster radius, the average distance from centroid + # to each point assigned to the cluster. + # Corresponds to the JSON property `clusterRadius` + # @return [Float] + attr_accessor :cluster_radius + + # Cluster size, the total number of points assigned to the cluster. + # Corresponds to the JSON property `clusterSize` + # @return [Fixnum] + attr_accessor :cluster_size + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @centroid_id = args[:centroid_id] if args.key?(:centroid_id) + @cluster_radius = args[:cluster_radius] if args.key?(:cluster_radius) + @cluster_size = args[:cluster_size] if args.key?(:cluster_size) + end + end + # class Clustering include Google::Apis::Core::Hashable @@ -411,6 +597,57 @@ module Google end end + # Evaluation metrics for clustering models. + class ClusteringMetrics + include Google::Apis::Core::Hashable + + # Davies-Bouldin index. + # Corresponds to the JSON property `daviesBouldinIndex` + # @return [Float] + attr_accessor :davies_bouldin_index + + # Mean of squared distances between each sample to its cluster centroid. + # Corresponds to the JSON property `meanSquaredDistance` + # @return [Float] + attr_accessor :mean_squared_distance + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @davies_bouldin_index = args[:davies_bouldin_index] if args.key?(:davies_bouldin_index) + @mean_squared_distance = args[:mean_squared_distance] if args.key?(:mean_squared_distance) + end + end + + # Confusion matrix for multi-class classification models. + class ConfusionMatrix + include Google::Apis::Core::Hashable + + # Confidence threshold used when computing the entries of the + # confusion matrix. + # Corresponds to the JSON property `confidenceThreshold` + # @return [Float] + attr_accessor :confidence_threshold + + # One row per actual label. + # Corresponds to the JSON property `rows` + # @return [Array] + attr_accessor :rows + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @confidence_threshold = args[:confidence_threshold] if args.key?(:confidence_threshold) + @rows = args[:rows] if args.key?(:rows) + end + end + # class CsvOptions include Google::Apis::Core::Hashable @@ -867,6 +1104,33 @@ module Google end end + # A single entry in the confusion matrix. + class Entry + include Google::Apis::Core::Hashable + + # Number of items being predicted as this label. + # Corresponds to the JSON property `itemCount` + # @return [Fixnum] + attr_accessor :item_count + + # The predicted label. For confidence_threshold > 0, we will + # also add an entry indicating the number of items under the + # confidence threshold. + # Corresponds to the JSON property `predictedLabel` + # @return [String] + attr_accessor :predicted_label + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @item_count = args[:item_count] if args.key?(:item_count) + @predicted_label = args[:predicted_label] if args.key?(:predicted_label) + end + end + # class ErrorProto include Google::Apis::Core::Hashable @@ -905,6 +1169,45 @@ module Google end end + # Evaluation metrics of a model. These are either computed on all training + # data or just the eval data based on whether eval data was used during + # training. These are not present for imported models. + class EvaluationMetrics + include Google::Apis::Core::Hashable + + # Evaluation metrics for binary classification/classifier models. + # Corresponds to the JSON property `binaryClassificationMetrics` + # @return [Google::Apis::BigqueryV2::BinaryClassificationMetrics] + attr_accessor :binary_classification_metrics + + # Evaluation metrics for clustering models. + # Corresponds to the JSON property `clusteringMetrics` + # @return [Google::Apis::BigqueryV2::ClusteringMetrics] + attr_accessor :clustering_metrics + + # Evaluation metrics for multi-class classification/classifier models. + # Corresponds to the JSON property `multiClassClassificationMetrics` + # @return [Google::Apis::BigqueryV2::MultiClassClassificationMetrics] + attr_accessor :multi_class_classification_metrics + + # Evaluation metrics for regression models. + # Corresponds to the JSON property `regressionMetrics` + # @return [Google::Apis::BigqueryV2::RegressionMetrics] + attr_accessor :regression_metrics + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @binary_classification_metrics = args[:binary_classification_metrics] if args.key?(:binary_classification_metrics) + @clustering_metrics = args[:clustering_metrics] if args.key?(:clustering_metrics) + @multi_class_classification_metrics = args[:multi_class_classification_metrics] if args.key?(:multi_class_classification_metrics) + @regression_metrics = args[:regression_metrics] if args.key?(:regression_metrics) + end + end + # class ExplainQueryStage include Google::Apis::Core::Hashable @@ -1394,6 +1697,55 @@ module Google end end + # Information about a single iteration of the training run. + class IterationResult + include Google::Apis::Core::Hashable + + # [Beta] Information about top clusters for clustering models. + # Corresponds to the JSON property `clusterInfos` + # @return [Array] + attr_accessor :cluster_infos + + # Time taken to run the iteration in milliseconds. + # Corresponds to the JSON property `durationMs` + # @return [Fixnum] + attr_accessor :duration_ms + + # Loss computed on the eval data at the end of iteration. + # Corresponds to the JSON property `evalLoss` + # @return [Float] + attr_accessor :eval_loss + + # Index of the iteration, 0 based. + # Corresponds to the JSON property `index` + # @return [Fixnum] + attr_accessor :index + + # Learn rate used for this iteration. + # Corresponds to the JSON property `learnRate` + # @return [Float] + attr_accessor :learn_rate + + # Loss computed on the training data at the end of iteration. + # Corresponds to the JSON property `trainingLoss` + # @return [Float] + attr_accessor :training_loss + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @cluster_infos = args[:cluster_infos] if args.key?(:cluster_infos) + @duration_ms = args[:duration_ms] if args.key?(:duration_ms) + @eval_loss = args[:eval_loss] if args.key?(:eval_loss) + @index = args[:index] if args.key?(:index) + @learn_rate = args[:learn_rate] if args.key?(:learn_rate) + @training_loss = args[:training_loss] if args.key?(:training_loss) + end + end + # class Job include Google::Apis::Core::Hashable @@ -2722,6 +3074,55 @@ module Google end end + # + class ListModelsResponse + include Google::Apis::Core::Hashable + + # Models in the requested dataset. Only the following fields are populated: + # model_reference, model_type, creation_time, last_modified_time and + # labels. + # Corresponds to the JSON property `models` + # @return [Array] + attr_accessor :models + + # A token to request the next page of results. + # 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) + @models = args[:models] if args.key?(:models) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # BigQuery-specific metadata about a location. This will be set on + # google.cloud.location.Location.metadata in Cloud Location API + # responses. + class LocationMetadata + include Google::Apis::Core::Hashable + + # The legacy BigQuery location ID, e.g. “EU” for the “europe” location. + # This is for any API consumers that need the legacy “US” and “EU” locations. + # Corresponds to the JSON property `legacyLocationId` + # @return [String] + attr_accessor :legacy_location_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @legacy_location_id = args[:legacy_location_id] if args.key?(:legacy_location_id) + end + end + # class MaterializedViewDefinition include Google::Apis::Core::Hashable @@ -2748,6 +3149,115 @@ module Google end end + # + class Model + include Google::Apis::Core::Hashable + + # Output only. The time when this model was created, in millisecs since the + # epoch. + # Corresponds to the JSON property `creationTime` + # @return [Fixnum] + attr_accessor :creation_time + + # [Optional] A user-friendly description of this model. + # @mutable bigquery.models.patch + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # Output only. A hash of this resource. + # Corresponds to the JSON property `etag` + # @return [String] + attr_accessor :etag + + # [Optional] The time when this model expires, in milliseconds since the + # epoch. If not present, the model will persist indefinitely. Expired models + # will be deleted and their storage reclaimed. The defaultTableExpirationMs + # property of the encapsulating dataset can be used to set a default + # expirationTime on newly created models. + # @mutable bigquery.models.patch + # Corresponds to the JSON property `expirationTime` + # @return [Fixnum] + attr_accessor :expiration_time + + # Output only. Input feature columns that were used to train this model. + # Corresponds to the JSON property `featureColumns` + # @return [Array] + attr_accessor :feature_columns + + # [Optional] A descriptive name for this model. + # @mutable bigquery.models.patch + # Corresponds to the JSON property `friendlyName` + # @return [String] + attr_accessor :friendly_name + + # Output only. Label columns that were used to train this model. + # The output of the model will have a "predicted_" prefix to these columns. + # Corresponds to the JSON property `labelColumns` + # @return [Array] + attr_accessor :label_columns + + # [Optional] The labels associated with this model. You can use these to + # organize and group your models. Label keys and values can be no longer + # than 63 characters, can only contain lowercase letters, numeric + # characters, underscores and dashes. International characters are allowed. + # Label values are optional. Label keys must start with a letter and each + # label in the list must have a different key. + # @mutable bigquery.models.patch + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + # Output only. The time when this model was last modified, in millisecs + # since the epoch. + # Corresponds to the JSON property `lastModifiedTime` + # @return [Fixnum] + attr_accessor :last_modified_time + + # Output only. The geographic location where the model resides. This value + # is inherited from the dataset. + # Corresponds to the JSON property `location` + # @return [String] + attr_accessor :location + + # Id path of a model. + # Corresponds to the JSON property `modelReference` + # @return [Google::Apis::BigqueryV2::ModelReference] + attr_accessor :model_reference + + # Output only. Type of the model resource. + # Corresponds to the JSON property `modelType` + # @return [String] + attr_accessor :model_type + + # Output only. Information for all training runs in increasing order of + # start_time. + # Corresponds to the JSON property `trainingRuns` + # @return [Array] + attr_accessor :training_runs + + 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) + @etag = args[:etag] if args.key?(:etag) + @expiration_time = args[:expiration_time] if args.key?(:expiration_time) + @feature_columns = args[:feature_columns] if args.key?(:feature_columns) + @friendly_name = args[:friendly_name] if args.key?(:friendly_name) + @label_columns = args[:label_columns] if args.key?(:label_columns) + @labels = args[:labels] if args.key?(:labels) + @last_modified_time = args[:last_modified_time] if args.key?(:last_modified_time) + @location = args[:location] if args.key?(:location) + @model_reference = args[:model_reference] if args.key?(:model_reference) + @model_type = args[:model_type] if args.key?(:model_type) + @training_runs = args[:training_runs] if args.key?(:training_runs) + end + end + # class ModelDefinition include Google::Apis::Core::Hashable @@ -2811,6 +3321,69 @@ module Google end end + # Id path of a model. + class ModelReference + include Google::Apis::Core::Hashable + + # [Required] The ID of the dataset containing this model. + # Corresponds to the JSON property `datasetId` + # @return [String] + attr_accessor :dataset_id + + # [Required] The ID of the model. The ID must contain only + # letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum + # length is 1,024 characters. + # Corresponds to the JSON property `modelId` + # @return [String] + attr_accessor :model_id + + # [Required] The ID of the project containing this model. + # Corresponds to the JSON property `projectId` + # @return [String] + attr_accessor :project_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @dataset_id = args[:dataset_id] if args.key?(:dataset_id) + @model_id = args[:model_id] if args.key?(:model_id) + @project_id = args[:project_id] if args.key?(:project_id) + end + end + + # Evaluation metrics for multi-class classification/classifier models. + class MultiClassClassificationMetrics + include Google::Apis::Core::Hashable + + # Aggregate metrics for classification/classifier models. For multi-class + # models, the metrics are either macro-averaged or micro-averaged. When + # macro-averaged, the metrics are calculated for each label and then an + # unweighted average is taken of those values. When micro-averaged, the + # metric is calculated globally by counting the total number of correctly + # predicted rows. + # Corresponds to the JSON property `aggregateClassificationMetrics` + # @return [Google::Apis::BigqueryV2::AggregateClassificationMetrics] + attr_accessor :aggregate_classification_metrics + + # Confusion matrix at different thresholds. + # Corresponds to the JSON property `confusionMatrixList` + # @return [Array] + attr_accessor :confusion_matrix_list + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @aggregate_classification_metrics = args[:aggregate_classification_metrics] if args.key?(:aggregate_classification_metrics) + @confusion_matrix_list = args[:confusion_matrix_list] if args.key?(:confusion_matrix_list) + end + end + # class ProjectList include Google::Apis::Core::Hashable @@ -3353,6 +3926,49 @@ module Google end end + # Evaluation metrics for regression models. + class RegressionMetrics + include Google::Apis::Core::Hashable + + # Mean absolute error. + # Corresponds to the JSON property `meanAbsoluteError` + # @return [Float] + attr_accessor :mean_absolute_error + + # Mean squared error. + # Corresponds to the JSON property `meanSquaredError` + # @return [Float] + attr_accessor :mean_squared_error + + # Mean squared log error. + # Corresponds to the JSON property `meanSquaredLogError` + # @return [Float] + attr_accessor :mean_squared_log_error + + # Median absolute error. + # Corresponds to the JSON property `medianAbsoluteError` + # @return [Float] + attr_accessor :median_absolute_error + + # R^2 score. + # Corresponds to the JSON property `rSquared` + # @return [Float] + attr_accessor :r_squared + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @mean_absolute_error = args[:mean_absolute_error] if args.key?(:mean_absolute_error) + @mean_squared_error = args[:mean_squared_error] if args.key?(:mean_squared_error) + @mean_squared_log_error = args[:mean_squared_log_error] if args.key?(:mean_squared_log_error) + @median_absolute_error = args[:median_absolute_error] if args.key?(:median_absolute_error) + @r_squared = args[:r_squared] if args.key?(:r_squared) + end + end + # class RoutineReference include Google::Apis::Core::Hashable @@ -3385,6 +4001,134 @@ module Google end end + # A single row in the confusion matrix. + class Row + include Google::Apis::Core::Hashable + + # The original label of this row. + # Corresponds to the JSON property `actualLabel` + # @return [String] + attr_accessor :actual_label + + # Info describing predicted label distribution. + # 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) + @actual_label = args[:actual_label] if args.key?(:actual_label) + @entries = args[:entries] if args.key?(:entries) + end + end + + # The type of a variable, e.g., a function argument. + # Examples: + # INT64: `type_kind="INT64"` + # ARRAY: `type_kind="ARRAY", array_element_type="STRING"` + # STRUCT>: + # `type_kind="STRUCT", + # struct_type=`fields=[ + # `name="x", type=`type_kind="STRING"``, + # `name="y", type=`type_kind="ARRAY", array_element_type="DATE"`` + # ]`` + class StandardSqlDataType + include Google::Apis::Core::Hashable + + # The type of a variable, e.g., a function argument. + # Examples: + # INT64: `type_kind="INT64"` + # ARRAY: `type_kind="ARRAY", array_element_type="STRING"` + # STRUCT>: + # `type_kind="STRUCT", + # struct_type=`fields=[ + # `name="x", type=`type_kind="STRING"``, + # `name="y", type=`type_kind="ARRAY", array_element_type="DATE"`` + # ]`` + # Corresponds to the JSON property `arrayElementType` + # @return [Google::Apis::BigqueryV2::StandardSqlDataType] + attr_accessor :array_element_type + + # The fields of this struct, in order, if type_kind = "STRUCT". + # Corresponds to the JSON property `structType` + # @return [Google::Apis::BigqueryV2::StandardSqlStructType] + attr_accessor :struct_type + + # Required. The top level type of this field. + # Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY"). + # Corresponds to the JSON property `typeKind` + # @return [String] + attr_accessor :type_kind + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @array_element_type = args[:array_element_type] if args.key?(:array_element_type) + @struct_type = args[:struct_type] if args.key?(:struct_type) + @type_kind = args[:type_kind] if args.key?(:type_kind) + end + end + + # A field or a column. + class StandardSqlField + include Google::Apis::Core::Hashable + + # Optional. The name of this field. Can be absent for struct fields. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The type of a variable, e.g., a function argument. + # Examples: + # INT64: `type_kind="INT64"` + # ARRAY: `type_kind="ARRAY", array_element_type="STRING"` + # STRUCT>: + # `type_kind="STRUCT", + # struct_type=`fields=[ + # `name="x", type=`type_kind="STRING"``, + # `name="y", type=`type_kind="ARRAY", array_element_type="DATE"`` + # ]`` + # Corresponds to the JSON property `type` + # @return [Google::Apis::BigqueryV2::StandardSqlDataType] + attr_accessor :type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @name = args[:name] if args.key?(:name) + @type = args[:type] if args.key?(:type) + end + end + + # + class StandardSqlStructType + include Google::Apis::Core::Hashable + + # + # Corresponds to the JSON property `fields` + # @return [Array] + attr_accessor :fields + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @fields = args[:fields] if args.key?(:fields) + end + end + # class Streamingbuffer include Google::Apis::Core::Hashable @@ -4166,6 +4910,196 @@ module Google end end + # + class TrainingOptions + include Google::Apis::Core::Hashable + + # The column to split data with. This column won't be used as a + # feature. + # 1. When data_split_method is CUSTOM, the corresponding column should + # be boolean. The rows with true value tag are eval data, and the false + # are training data. + # 2. When data_split_method is SEQ, the first DATA_SPLIT_EVAL_FRACTION + # rows (from smallest to largest) in the corresponding column are used + # as training data, and the rest are eval data. It respects the order + # in Orderable data types: + # https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#data- + # type-properties + # Corresponds to the JSON property `dataSplitColumn` + # @return [String] + attr_accessor :data_split_column + + # The fraction of evaluation data over the whole input data. The rest + # of data will be used as training data. The format should be double. + # Accurate to two decimal places. + # Default value is 0.2. + # Corresponds to the JSON property `dataSplitEvalFraction` + # @return [Float] + attr_accessor :data_split_eval_fraction + + # The data split type for training and evaluation, e.g. RANDOM. + # Corresponds to the JSON property `dataSplitMethod` + # @return [String] + attr_accessor :data_split_method + + # [Beta] Distance type for clustering models. + # Corresponds to the JSON property `distanceType` + # @return [String] + attr_accessor :distance_type + + # Whether to stop early when the loss doesn't improve significantly + # any more (compared to min_relative_progress). Used only for iterative + # training algorithms. + # Corresponds to the JSON property `earlyStop` + # @return [Boolean] + attr_accessor :early_stop + alias_method :early_stop?, :early_stop + + # Specifies the initial learning rate for the line search learn rate + # strategy. + # Corresponds to the JSON property `initialLearnRate` + # @return [Float] + attr_accessor :initial_learn_rate + + # Name of input label columns in training data. + # Corresponds to the JSON property `inputLabelColumns` + # @return [Array] + attr_accessor :input_label_columns + + # L1 regularization coefficient. + # Corresponds to the JSON property `l1Regularization` + # @return [Float] + attr_accessor :l1_regularization + + # L2 regularization coefficient. + # Corresponds to the JSON property `l2Regularization` + # @return [Float] + attr_accessor :l2_regularization + + # Weights associated with each label class, for rebalancing the + # training data. Only applicable for classification models. + # Corresponds to the JSON property `labelClassWeights` + # @return [Hash] + attr_accessor :label_class_weights + + # Learning rate in training. Used only for iterative training algorithms. + # Corresponds to the JSON property `learnRate` + # @return [Float] + attr_accessor :learn_rate + + # The strategy to determine learn rate for the current iteration. + # Corresponds to the JSON property `learnRateStrategy` + # @return [String] + attr_accessor :learn_rate_strategy + + # Type of loss function used during training run. + # Corresponds to the JSON property `lossType` + # @return [String] + attr_accessor :loss_type + + # The maximum number of iterations in training. Used only for iterative + # training algorithms. + # Corresponds to the JSON property `maxIterations` + # @return [Fixnum] + attr_accessor :max_iterations + + # When early_stop is true, stops training when accuracy improvement is + # less than 'min_relative_progress'. Used only for iterative training + # algorithms. + # Corresponds to the JSON property `minRelativeProgress` + # @return [Float] + attr_accessor :min_relative_progress + + # [Beta] Google Cloud Storage URI from which the model was imported. Only + # applicable for imported models. + # Corresponds to the JSON property `modelUri` + # @return [String] + attr_accessor :model_uri + + # [Beta] Number of clusters for clustering models. + # Corresponds to the JSON property `numClusters` + # @return [Fixnum] + attr_accessor :num_clusters + + # Optimization strategy for training linear regression models. + # Corresponds to the JSON property `optimizationStrategy` + # @return [String] + attr_accessor :optimization_strategy + + # Whether to train a model from the last checkpoint. + # Corresponds to the JSON property `warmStart` + # @return [Boolean] + attr_accessor :warm_start + alias_method :warm_start?, :warm_start + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @data_split_column = args[:data_split_column] if args.key?(:data_split_column) + @data_split_eval_fraction = args[:data_split_eval_fraction] if args.key?(:data_split_eval_fraction) + @data_split_method = args[:data_split_method] if args.key?(:data_split_method) + @distance_type = args[:distance_type] if args.key?(:distance_type) + @early_stop = args[:early_stop] if args.key?(:early_stop) + @initial_learn_rate = args[:initial_learn_rate] if args.key?(:initial_learn_rate) + @input_label_columns = args[:input_label_columns] if args.key?(:input_label_columns) + @l1_regularization = args[:l1_regularization] if args.key?(:l1_regularization) + @l2_regularization = args[:l2_regularization] if args.key?(:l2_regularization) + @label_class_weights = args[:label_class_weights] if args.key?(:label_class_weights) + @learn_rate = args[:learn_rate] if args.key?(:learn_rate) + @learn_rate_strategy = args[:learn_rate_strategy] if args.key?(:learn_rate_strategy) + @loss_type = args[:loss_type] if args.key?(:loss_type) + @max_iterations = args[:max_iterations] if args.key?(:max_iterations) + @min_relative_progress = args[:min_relative_progress] if args.key?(:min_relative_progress) + @model_uri = args[:model_uri] if args.key?(:model_uri) + @num_clusters = args[:num_clusters] if args.key?(:num_clusters) + @optimization_strategy = args[:optimization_strategy] if args.key?(:optimization_strategy) + @warm_start = args[:warm_start] if args.key?(:warm_start) + end + end + + # Information about a single training query run for the model. + class TrainingRun + include Google::Apis::Core::Hashable + + # Evaluation metrics of a model. These are either computed on all training + # data or just the eval data based on whether eval data was used during + # training. These are not present for imported models. + # Corresponds to the JSON property `evaluationMetrics` + # @return [Google::Apis::BigqueryV2::EvaluationMetrics] + attr_accessor :evaluation_metrics + + # Output of each iteration run, results.size() <= max_iterations. + # Corresponds to the JSON property `results` + # @return [Array] + attr_accessor :results + + # The start time of this training run. + # Corresponds to the JSON property `startTime` + # @return [String] + attr_accessor :start_time + + # Options that were used for this training run, includes + # user specified and default options that were used. + # Corresponds to the JSON property `trainingOptions` + # @return [Google::Apis::BigqueryV2::TrainingOptions] + attr_accessor :training_options + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @evaluation_metrics = args[:evaluation_metrics] if args.key?(:evaluation_metrics) + @results = args[:results] if args.key?(:results) + @start_time = args[:start_time] if args.key?(:start_time) + @training_options = args[:training_options] if args.key?(:training_options) + end + end + # class UserDefinedFunctionResource include Google::Apis::Core::Hashable diff --git a/generated/google/apis/bigquery_v2/representations.rb b/generated/google/apis/bigquery_v2/representations.rb index 915c7b9ce..7f2de56f0 100644 --- a/generated/google/apis/bigquery_v2/representations.rb +++ b/generated/google/apis/bigquery_v2/representations.rb @@ -22,6 +22,12 @@ module Google module Apis module BigqueryV2 + class AggregateClassificationMetrics + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class BigQueryModelTraining class Representation < Google::Apis::Core::JsonRepresentation; end @@ -46,6 +52,18 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class BinaryClassificationMetrics + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class BinaryConfusionMatrix + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class BqmlIterationResult class Representation < Google::Apis::Core::JsonRepresentation; end @@ -64,12 +82,30 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class ClusterInfo + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class Clustering class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class ClusteringMetrics + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ConfusionMatrix + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class CsvOptions class Representation < Google::Apis::Core::JsonRepresentation; end @@ -118,12 +154,24 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class Entry + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class ErrorProto class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class EvaluationMetrics + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class ExplainQueryStage class Representation < Google::Apis::Core::JsonRepresentation; end @@ -160,6 +208,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class IterationResult + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class Job class Representation < Google::Apis::Core::JsonRepresentation; end @@ -262,12 +316,30 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class ListModelsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class LocationMetadata + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class MaterializedViewDefinition class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class Model + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class ModelDefinition class Representation < Google::Apis::Core::JsonRepresentation; end @@ -280,6 +352,18 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class ModelReference + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class MultiClassClassificationMetrics + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class ProjectList class Representation < Google::Apis::Core::JsonRepresentation; end @@ -352,12 +436,42 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class RegressionMetrics + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class RoutineReference class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class Row + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class StandardSqlDataType + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class StandardSqlField + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class StandardSqlStructType + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class Streamingbuffer class Representation < Google::Apis::Core::JsonRepresentation; end @@ -460,6 +574,18 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class TrainingOptions + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TrainingRun + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class UserDefinedFunctionResource class Representation < Google::Apis::Core::JsonRepresentation; end @@ -472,6 +598,19 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class AggregateClassificationMetrics + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :accuracy, as: 'accuracy' + property :f1_score, as: 'f1Score' + property :log_loss, as: 'logLoss' + property :precision, as: 'precision' + property :recall, as: 'recall' + property :roc_auc, as: 'rocAuc' + property :threshold, as: 'threshold' + end + end + class BigQueryModelTraining # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -514,6 +653,29 @@ module Google end end + class BinaryClassificationMetrics + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :aggregate_classification_metrics, as: 'aggregateClassificationMetrics', class: Google::Apis::BigqueryV2::AggregateClassificationMetrics, decorator: Google::Apis::BigqueryV2::AggregateClassificationMetrics::Representation + + collection :binary_confusion_matrix_list, as: 'binaryConfusionMatrixList', class: Google::Apis::BigqueryV2::BinaryConfusionMatrix, decorator: Google::Apis::BigqueryV2::BinaryConfusionMatrix::Representation + + end + end + + class BinaryConfusionMatrix + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :false_negatives, :numeric_string => true, as: 'falseNegatives' + property :false_positives, :numeric_string => true, as: 'falsePositives' + property :positive_class_threshold, as: 'positiveClassThreshold' + property :precision, as: 'precision' + property :recall, as: 'recall' + property :true_negatives, :numeric_string => true, as: 'trueNegatives' + property :true_positives, :numeric_string => true, as: 'truePositives' + end + end + class BqmlIterationResult # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -553,6 +715,15 @@ module Google end end + class ClusterInfo + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :centroid_id, :numeric_string => true, as: 'centroidId' + property :cluster_radius, as: 'clusterRadius' + property :cluster_size, :numeric_string => true, as: 'clusterSize' + end + end + class Clustering # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -560,6 +731,23 @@ module Google end end + class ClusteringMetrics + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :davies_bouldin_index, as: 'daviesBouldinIndex' + property :mean_squared_distance, as: 'meanSquaredDistance' + end + end + + class ConfusionMatrix + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :confidence_threshold, as: 'confidenceThreshold' + collection :rows, as: 'rows', class: Google::Apis::BigqueryV2::Row, decorator: Google::Apis::BigqueryV2::Row::Representation + + end + end + class CsvOptions # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -656,6 +844,14 @@ module Google end end + class Entry + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :item_count, :numeric_string => true, as: 'itemCount' + property :predicted_label, as: 'predictedLabel' + end + end + class ErrorProto # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -666,6 +862,20 @@ module Google end end + class EvaluationMetrics + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :binary_classification_metrics, as: 'binaryClassificationMetrics', class: Google::Apis::BigqueryV2::BinaryClassificationMetrics, decorator: Google::Apis::BigqueryV2::BinaryClassificationMetrics::Representation + + property :clustering_metrics, as: 'clusteringMetrics', class: Google::Apis::BigqueryV2::ClusteringMetrics, decorator: Google::Apis::BigqueryV2::ClusteringMetrics::Representation + + property :multi_class_classification_metrics, as: 'multiClassClassificationMetrics', class: Google::Apis::BigqueryV2::MultiClassClassificationMetrics, decorator: Google::Apis::BigqueryV2::MultiClassClassificationMetrics::Representation + + property :regression_metrics, as: 'regressionMetrics', class: Google::Apis::BigqueryV2::RegressionMetrics, decorator: Google::Apis::BigqueryV2::RegressionMetrics::Representation + + end + end + class ExplainQueryStage # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -769,6 +979,19 @@ module Google end end + class IterationResult + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :cluster_infos, as: 'clusterInfos', class: Google::Apis::BigqueryV2::ClusterInfo, decorator: Google::Apis::BigqueryV2::ClusterInfo::Representation + + property :duration_ms, :numeric_string => true, as: 'durationMs' + property :eval_loss, as: 'evalLoss' + property :index, as: 'index' + property :learn_rate, as: 'learnRate' + property :training_loss, as: 'trainingLoss' + end + end + class Job # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1068,6 +1291,22 @@ module Google end end + class ListModelsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :models, as: 'models', class: Google::Apis::BigqueryV2::Model, decorator: Google::Apis::BigqueryV2::Model::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class LocationMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :legacy_location_id, as: 'legacyLocationId' + end + end + class MaterializedViewDefinition # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1076,6 +1315,29 @@ module Google end end + class Model + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :creation_time, :numeric_string => true, as: 'creationTime' + property :description, as: 'description' + property :etag, as: 'etag' + property :expiration_time, :numeric_string => true, as: 'expirationTime' + collection :feature_columns, as: 'featureColumns', class: Google::Apis::BigqueryV2::StandardSqlField, decorator: Google::Apis::BigqueryV2::StandardSqlField::Representation + + property :friendly_name, as: 'friendlyName' + collection :label_columns, as: 'labelColumns', class: Google::Apis::BigqueryV2::StandardSqlField, decorator: Google::Apis::BigqueryV2::StandardSqlField::Representation + + hash :labels, as: 'labels' + property :last_modified_time, :numeric_string => true, as: 'lastModifiedTime' + property :location, as: 'location' + property :model_reference, as: 'modelReference', class: Google::Apis::BigqueryV2::ModelReference, decorator: Google::Apis::BigqueryV2::ModelReference::Representation + + property :model_type, as: 'modelType' + collection :training_runs, as: 'trainingRuns', class: Google::Apis::BigqueryV2::TrainingRun, decorator: Google::Apis::BigqueryV2::TrainingRun::Representation + + end + end + class ModelDefinition # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1095,6 +1357,25 @@ module Google end end + class ModelReference + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :dataset_id, as: 'datasetId' + property :model_id, as: 'modelId' + property :project_id, as: 'projectId' + end + end + + class MultiClassClassificationMetrics + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :aggregate_classification_metrics, as: 'aggregateClassificationMetrics', class: Google::Apis::BigqueryV2::AggregateClassificationMetrics, decorator: Google::Apis::BigqueryV2::AggregateClassificationMetrics::Representation + + collection :confusion_matrix_list, as: 'confusionMatrixList', class: Google::Apis::BigqueryV2::ConfusionMatrix, decorator: Google::Apis::BigqueryV2::ConfusionMatrix::Representation + + end + end + class ProjectList # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1239,6 +1520,17 @@ module Google end end + class RegressionMetrics + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :mean_absolute_error, as: 'meanAbsoluteError' + property :mean_squared_error, as: 'meanSquaredError' + property :mean_squared_log_error, as: 'meanSquaredLogError' + property :median_absolute_error, as: 'medianAbsoluteError' + property :r_squared, as: 'rSquared' + end + end + class RoutineReference # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1248,6 +1540,43 @@ module Google end end + class Row + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :actual_label, as: 'actualLabel' + collection :entries, as: 'entries', class: Google::Apis::BigqueryV2::Entry, decorator: Google::Apis::BigqueryV2::Entry::Representation + + end + end + + class StandardSqlDataType + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :array_element_type, as: 'arrayElementType', class: Google::Apis::BigqueryV2::StandardSqlDataType, decorator: Google::Apis::BigqueryV2::StandardSqlDataType::Representation + + property :struct_type, as: 'structType', class: Google::Apis::BigqueryV2::StandardSqlStructType, decorator: Google::Apis::BigqueryV2::StandardSqlStructType::Representation + + property :type_kind, as: 'typeKind' + end + end + + class StandardSqlField + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :name, as: 'name' + property :type, as: 'type', class: Google::Apis::BigqueryV2::StandardSqlDataType, decorator: Google::Apis::BigqueryV2::StandardSqlDataType::Representation + + end + end + + class StandardSqlStructType + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :fields, as: 'fields', class: Google::Apis::BigqueryV2::StandardSqlField, decorator: Google::Apis::BigqueryV2::StandardSqlField::Representation + + end + end + class Streamingbuffer # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1455,6 +1784,44 @@ module Google end end + class TrainingOptions + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :data_split_column, as: 'dataSplitColumn' + property :data_split_eval_fraction, as: 'dataSplitEvalFraction' + property :data_split_method, as: 'dataSplitMethod' + property :distance_type, as: 'distanceType' + property :early_stop, as: 'earlyStop' + property :initial_learn_rate, as: 'initialLearnRate' + collection :input_label_columns, as: 'inputLabelColumns' + property :l1_regularization, as: 'l1Regularization' + property :l2_regularization, as: 'l2Regularization' + hash :label_class_weights, as: 'labelClassWeights' + property :learn_rate, as: 'learnRate' + property :learn_rate_strategy, as: 'learnRateStrategy' + property :loss_type, as: 'lossType' + property :max_iterations, :numeric_string => true, as: 'maxIterations' + property :min_relative_progress, as: 'minRelativeProgress' + property :model_uri, as: 'modelUri' + property :num_clusters, :numeric_string => true, as: 'numClusters' + property :optimization_strategy, as: 'optimizationStrategy' + property :warm_start, as: 'warmStart' + end + end + + class TrainingRun + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :evaluation_metrics, as: 'evaluationMetrics', class: Google::Apis::BigqueryV2::EvaluationMetrics, decorator: Google::Apis::BigqueryV2::EvaluationMetrics::Representation + + collection :results, as: 'results', class: Google::Apis::BigqueryV2::IterationResult, decorator: Google::Apis::BigqueryV2::IterationResult::Representation + + property :start_time, as: 'startTime' + property :training_options, as: 'trainingOptions', class: Google::Apis::BigqueryV2::TrainingOptions, decorator: Google::Apis::BigqueryV2::TrainingOptions::Representation + + end + end + class UserDefinedFunctionResource # @private class Representation < Google::Apis::Core::JsonRepresentation diff --git a/generated/google/apis/bigquery_v2/service.rb b/generated/google/apis/bigquery_v2/service.rb index 82ebe5944..4dd43c9cb 100644 --- a/generated/google/apis/bigquery_v2/service.rb +++ b/generated/google/apis/bigquery_v2/service.rb @@ -577,6 +577,168 @@ module Google execute_or_queue_command(command, &block) end + # Deletes the model specified by modelId from the dataset. + # @param [String] project_id + # Project ID of the model to delete. + # @param [String] dataset_id + # Dataset ID of the model to delete. + # @param [String] model_id + # Model ID of the model to delete. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [NilClass] No result returned for this method + # @yieldparam err [StandardError] error object if request failed + # + # @return [void] + # + # @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_model(project_id, dataset_id, model_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:delete, 'projects/{+projectId}/datasets/{+datasetId}/models/{+modelId}', options) + command.params['projectId'] = project_id unless project_id.nil? + command.params['datasetId'] = dataset_id unless dataset_id.nil? + command.params['modelId'] = model_id unless model_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 + + # Gets the specified model resource by model ID. + # @param [String] project_id + # Project ID of the requested model. + # @param [String] dataset_id + # Dataset ID of the requested model. + # @param [String] model_id + # Model ID of the requested model. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::BigqueryV2::Model] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::BigqueryV2::Model] + # + # @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_model(project_id, dataset_id, model_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:get, 'projects/{+projectId}/datasets/{+datasetId}/models/{+modelId}', options) + command.response_representation = Google::Apis::BigqueryV2::Model::Representation + command.response_class = Google::Apis::BigqueryV2::Model + command.params['projectId'] = project_id unless project_id.nil? + command.params['datasetId'] = dataset_id unless dataset_id.nil? + command.params['modelId'] = model_id unless model_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 + + # Lists all models in the specified dataset. Requires the READER dataset + # role. + # @param [String] project_id + # Project ID of the models to list. + # @param [String] dataset_id + # Dataset ID of the models to list. + # @param [Fixnum] max_results + # The maximum number of results per page. + # @param [String] page_token + # Page token, returned by a previous call to request the next page of + # results + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::BigqueryV2::ListModelsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::BigqueryV2::ListModelsResponse] + # + # @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_models(project_id, dataset_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:get, 'projects/{+projectId}/datasets/{+datasetId}/models', options) + command.response_representation = Google::Apis::BigqueryV2::ListModelsResponse::Representation + command.response_class = Google::Apis::BigqueryV2::ListModelsResponse + command.params['projectId'] = project_id unless project_id.nil? + command.params['datasetId'] = dataset_id unless dataset_id.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 + + # Patch specific fields in the specified model. + # @param [String] project_id + # Project ID of the model to patch. + # @param [String] dataset_id + # Dataset ID of the model to patch. + # @param [String] model_id + # Model ID of the model to patch. + # @param [Google::Apis::BigqueryV2::Model] model_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::BigqueryV2::Model] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::BigqueryV2::Model] + # + # @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_model(project_id, dataset_id, model_id, model_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:patch, 'projects/{+projectId}/datasets/{+datasetId}/models/{+modelId}', options) + command.request_representation = Google::Apis::BigqueryV2::Model::Representation + command.request_object = model_object + command.response_representation = Google::Apis::BigqueryV2::Model::Representation + command.response_class = Google::Apis::BigqueryV2::Model + command.params['projectId'] = project_id unless project_id.nil? + command.params['datasetId'] = dataset_id unless dataset_id.nil? + command.params['modelId'] = model_id unless model_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 + # Returns the email address of the service account for your project used for # interactions with Google Cloud KMS. # @param [String] project_id diff --git a/generated/google/apis/cloudresourcemanager_v1.rb b/generated/google/apis/cloudresourcemanager_v1.rb index 9e06b7c2a..aaeca65e2 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 = '20190424' + REVISION = '20190513' # 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_v1/classes.rb b/generated/google/apis/cloudresourcemanager_v1/classes.rb index 8e3c359f9..48157191a 100644 --- a/generated/google/apis/cloudresourcemanager_v1/classes.rb +++ b/generated/google/apis/cloudresourcemanager_v1/classes.rb @@ -1084,7 +1084,7 @@ module Google # The server-assigned name, which is only unique within the same service that # originally returns it. If you use the default HTTP mapping, the - # `name` should have the format of `operations/some/unique/name`. + # `name` should be a resource name ending with `operations/`unique_id``. # Corresponds to the JSON property `name` # @return [String] attr_accessor :name diff --git a/generated/google/apis/cloudresourcemanager_v2.rb b/generated/google/apis/cloudresourcemanager_v2.rb index 8dafcdb34..b92260dc9 100644 --- a/generated/google/apis/cloudresourcemanager_v2.rb +++ b/generated/google/apis/cloudresourcemanager_v2.rb @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/resource-manager module CloudresourcemanagerV2 VERSION = 'V2' - REVISION = '20190403' + REVISION = '20190515' # 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_v2/classes.rb b/generated/google/apis/cloudresourcemanager_v2/classes.rb index 8ac1eb368..ace8fefb9 100644 --- a/generated/google/apis/cloudresourcemanager_v2/classes.rb +++ b/generated/google/apis/cloudresourcemanager_v2/classes.rb @@ -475,7 +475,7 @@ module Google # The server-assigned name, which is only unique within the same service that # originally returns it. If you use the default HTTP mapping, the - # `name` should have the format of `operations/some/unique/name`. + # `name` should be a resource name ending with `operations/`unique_id``. # Corresponds to the JSON property `name` # @return [String] attr_accessor :name diff --git a/generated/google/apis/cloudresourcemanager_v2beta1.rb b/generated/google/apis/cloudresourcemanager_v2beta1.rb index d51bb1eb8..a50a133c9 100644 --- a/generated/google/apis/cloudresourcemanager_v2beta1.rb +++ b/generated/google/apis/cloudresourcemanager_v2beta1.rb @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/resource-manager module CloudresourcemanagerV2beta1 VERSION = 'V2beta1' - REVISION = '20190403' + REVISION = '20190515' # 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_v2beta1/classes.rb b/generated/google/apis/cloudresourcemanager_v2beta1/classes.rb index 015523f3e..0c44b9acb 100644 --- a/generated/google/apis/cloudresourcemanager_v2beta1/classes.rb +++ b/generated/google/apis/cloudresourcemanager_v2beta1/classes.rb @@ -475,7 +475,7 @@ module Google # The server-assigned name, which is only unique within the same service that # originally returns it. If you use the default HTTP mapping, the - # `name` should have the format of `operations/some/unique/name`. + # `name` should be a resource name ending with `operations/`unique_id``. # Corresponds to the JSON property `name` # @return [String] attr_accessor :name diff --git a/generated/google/apis/cloudtasks_v2beta2.rb b/generated/google/apis/cloudtasks_v2beta2.rb index 178097b2d..1be4dbc07 100644 --- a/generated/google/apis/cloudtasks_v2beta2.rb +++ b/generated/google/apis/cloudtasks_v2beta2.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/tasks/ module CloudtasksV2beta2 VERSION = 'V2beta2' - REVISION = '20190412' + REVISION = '20190513' # 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/cloudtasks_v2beta2/classes.rb b/generated/google/apis/cloudtasks_v2beta2/classes.rb index 5989f1add..f4e2dadb5 100644 --- a/generated/google/apis/cloudtasks_v2beta2/classes.rb +++ b/generated/google/apis/cloudtasks_v2beta2/classes.rb @@ -91,13 +91,17 @@ module Google # required`](https://cloud.google.com/appengine/docs/standard/python/config/ # appref) # Task dispatches also do not follow redirects. - # The task attempt has succeeded if the app's request handler returns - # an HTTP response code in the range [`200` - `299`]. `503` is - # considered an App Engine system error instead of an application - # error. Requests returning error `503` will be retried regardless of - # retry configuration and not counted against retry counts. - # Any other response code or a failure to receive a response before the - # deadline is a failed attempt. + # The task attempt has succeeded if the app's request handler returns an HTTP + # response code in the range [`200` - `299`]. The task attempt has failed if + # the app's handler returns a non-2xx response code or Cloud Tasks does + # not receive response before the deadline. Failed + # tasks will be retried according to the + # retry configuration. `503` (Service Unavailable) is + # considered an App Engine system error instead of an application error and + # will cause Cloud Tasks' traffic congestion control to temporarily throttle + # the queue's dispatches. Unlike other types of task targets, a `429` (Too Many + # Requests) response from an app handler does not cause traffic congestion + # control to throttle the queue. class AppEngineHttpRequest include Google::Apis::Core::Hashable @@ -1626,13 +1630,17 @@ module Google # required`](https://cloud.google.com/appengine/docs/standard/python/config/ # appref) # Task dispatches also do not follow redirects. - # The task attempt has succeeded if the app's request handler returns - # an HTTP response code in the range [`200` - `299`]. `503` is - # considered an App Engine system error instead of an application - # error. Requests returning error `503` will be retried regardless of - # retry configuration and not counted against retry counts. - # Any other response code or a failure to receive a response before the - # deadline is a failed attempt. + # The task attempt has succeeded if the app's request handler returns an HTTP + # response code in the range [`200` - `299`]. The task attempt has failed if + # the app's handler returns a non-2xx response code or Cloud Tasks does + # not receive response before the deadline. Failed + # tasks will be retried according to the + # retry configuration. `503` (Service Unavailable) is + # considered an App Engine system error instead of an application error and + # will cause Cloud Tasks' traffic congestion control to temporarily throttle + # the queue's dispatches. Unlike other types of task targets, a `429` (Too Many + # Requests) response from an app handler does not cause traffic congestion + # control to throttle the queue. # Corresponds to the JSON property `appEngineHttpRequest` # @return [Google::Apis::CloudtasksV2beta2::AppEngineHttpRequest] attr_accessor :app_engine_http_request diff --git a/generated/google/apis/cloudtasks_v2beta2/service.rb b/generated/google/apis/cloudtasks_v2beta2/service.rb index 7242e1940..5a40f749c 100644 --- a/generated/google/apis/cloudtasks_v2beta2/service.rb +++ b/generated/google/apis/cloudtasks_v2beta2/service.rb @@ -874,12 +874,12 @@ module Google # The queue name. For example: # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` # @param [Fixnum] page_size - # Requested page size. Fewer tasks than requested might be returned. - # The maximum page size is 1000. If unspecified, the page size will - # be the maximum. Fewer tasks than requested might be returned, - # even if more tasks exist; use - # next_page_token in the - # response to determine if more tasks exist. + # Maximum page size. + # Fewer tasks than requested might be returned, even if more tasks exist; use + # next_page_token in the response to + # determine if more tasks exist. + # The maximum page size is 1000. If unspecified, the page size will be the + # maximum. # @param [String] page_token # A token identifying the page of results to return. # To request the first page results, page_token must be empty. To diff --git a/generated/google/apis/container_v1.rb b/generated/google/apis/container_v1.rb index aa577b4ff..79cd033a6 100644 --- a/generated/google/apis/container_v1.rb +++ b/generated/google/apis/container_v1.rb @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/container-engine/ module ContainerV1 VERSION = 'V1' - REVISION = '20190418' + REVISION = '20190423' # 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/container_v1/classes.rb b/generated/google/apis/container_v1/classes.rb index 01b7a9580..4bce8768c 100644 --- a/generated/google/apis/container_v1/classes.rb +++ b/generated/google/apis/container_v1/classes.rb @@ -437,7 +437,8 @@ module Google # [Output only] The size of the address space on each node for hosting # containers. This is provisioned from within the `container_ipv4_cidr` - # range. + # range. This field will only be set when cluster is in route-based network + # mode. # Corresponds to the JSON property `nodeIpv4CidrSize` # @return [Fixnum] attr_accessor :node_ipv4_cidr_size diff --git a/generated/google/apis/datastore_v1.rb b/generated/google/apis/datastore_v1.rb index 1e2352f20..8f01ac0e0 100644 --- a/generated/google/apis/datastore_v1.rb +++ b/generated/google/apis/datastore_v1.rb @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/datastore/ module DatastoreV1 VERSION = 'V1' - REVISION = '20190324' + REVISION = '20190421' # 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/datastore_v1beta3.rb b/generated/google/apis/datastore_v1beta3.rb index 41d012d69..8701cf3a5 100644 --- a/generated/google/apis/datastore_v1beta3.rb +++ b/generated/google/apis/datastore_v1beta3.rb @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/datastore/ module DatastoreV1beta3 VERSION = 'V1beta3' - REVISION = '20190324' + REVISION = '20190421' # 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/fcm_v1.rb b/generated/google/apis/fcm_v1.rb new file mode 100644 index 000000000..2e94a6540 --- /dev/null +++ b/generated/google/apis/fcm_v1.rb @@ -0,0 +1,35 @@ +# 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/fcm_v1/service.rb' +require 'google/apis/fcm_v1/classes.rb' +require 'google/apis/fcm_v1/representations.rb' + +module Google + module Apis + # Firebase Cloud Messaging API + # + # FCM send API that provides a cross-platform messaging solution to reliably + # deliver messages at no cost. + # + # @see https://firebase.google.com/docs/cloud-messaging + module FcmV1 + VERSION = 'V1' + REVISION = '20190516' + + # View and manage your data across Google Cloud Platform services + AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' + end + end +end diff --git a/generated/google/apis/fcm_v1/classes.rb b/generated/google/apis/fcm_v1/classes.rb new file mode 100644 index 000000000..b131aa5c9 --- /dev/null +++ b/generated/google/apis/fcm_v1/classes.rb @@ -0,0 +1,424 @@ +# 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 FcmV1 + + # Android specific options for messages sent through + # [FCM connection server](https://goo.gl/4GLdUl). + class AndroidConfig + include Google::Apis::Core::Hashable + + # An identifier of a group of messages that can be collapsed, so that only + # the last message gets sent when delivery can be resumed. A maximum of 4 + # different collapse keys is allowed at any given time. + # Corresponds to the JSON property `collapseKey` + # @return [String] + attr_accessor :collapse_key + + # Arbitrary key/value payload. If present, it will override + # google.firebase.fcm.v1.Message.data. + # Corresponds to the JSON property `data` + # @return [Hash] + attr_accessor :data + + # Notification to send to android devices. + # Corresponds to the JSON property `notification` + # @return [Google::Apis::FcmV1::AndroidNotification] + attr_accessor :notification + + # Message priority. Can take "normal" and "high" values. + # For more information, see [Setting the priority of a + # message](https://goo.gl/GjONJv). + # Corresponds to the JSON property `priority` + # @return [String] + attr_accessor :priority + + # Package name of the application where the registration token must match in + # order to receive the message. + # Corresponds to the JSON property `restrictedPackageName` + # @return [String] + attr_accessor :restricted_package_name + + # How long (in seconds) the message should be kept in FCM storage if the + # device is offline. The maximum time to live supported is 4 weeks, and the + # default value is 4 weeks if not set. Set it to 0 if want to send the + # message immediately. + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s". The ttl will be rounded down + # to the nearest second. + # Corresponds to the JSON property `ttl` + # @return [String] + attr_accessor :ttl + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @collapse_key = args[:collapse_key] if args.key?(:collapse_key) + @data = args[:data] if args.key?(:data) + @notification = args[:notification] if args.key?(:notification) + @priority = args[:priority] if args.key?(:priority) + @restricted_package_name = args[:restricted_package_name] if args.key?(:restricted_package_name) + @ttl = args[:ttl] if args.key?(:ttl) + end + end + + # Notification to send to android devices. + class AndroidNotification + include Google::Apis::Core::Hashable + + # The notification's body text. If present, it will override + # google.firebase.fcm.v1.Notification.body. + # Corresponds to the JSON property `body` + # @return [String] + attr_accessor :body + + # Variable string values to be used in place of the format specifiers in + # body_loc_key to use to localize the body text to the user's current + # localization. + # See [Formatting and Styling](https://goo.gl/MalYE3) for more information. + # Corresponds to the JSON property `bodyLocArgs` + # @return [Array] + attr_accessor :body_loc_args + + # The key to the body string in the app's string resources to use to localize + # the body text to the user's current localization. + # See [String Resources](https://goo.gl/NdFZGI) for more information. + # Corresponds to the JSON property `bodyLocKey` + # @return [String] + attr_accessor :body_loc_key + + # The [notification's channel + # id](https://developer.android.com/guide/topics/ui/notifiers/notifications# + # ManageChannels) + # (new in Android O). The app must create a channel with this channel ID + # before any notification with this channel ID is received. If you don't send + # this channel ID in the request, or if the channel ID provided has not yet + # been created by the app, FCM uses the channel ID specified in the app + # manifest. + # Corresponds to the JSON property `channelId` + # @return [String] + attr_accessor :channel_id + + # The action associated with a user click on the notification. + # If specified, an activity with a matching intent filter is launched when + # a user clicks on the notification. + # Corresponds to the JSON property `clickAction` + # @return [String] + attr_accessor :click_action + + # The notification's icon color, expressed in #rrggbb format. + # Corresponds to the JSON property `color` + # @return [String] + attr_accessor :color + + # The notification's icon. + # Sets the notification icon to myicon for drawable resource myicon. + # If you don't send this key in the request, FCM displays the launcher icon + # specified in your app manifest. + # Corresponds to the JSON property `icon` + # @return [String] + attr_accessor :icon + + # The sound to play when the device receives the notification. + # Supports "default" or the filename of a sound resource bundled in the app. + # Sound files must reside in /res/raw/. + # Corresponds to the JSON property `sound` + # @return [String] + attr_accessor :sound + + # Identifier used to replace existing notifications in the notification + # drawer. + # If not specified, each request creates a new notification. + # If specified and a notification with the same tag is already being shown, + # the new notification replaces the existing one in the notification drawer. + # Corresponds to the JSON property `tag` + # @return [String] + attr_accessor :tag + + # The notification's title. If present, it will override + # google.firebase.fcm.v1.Notification.title. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + # Variable string values to be used in place of the format specifiers in + # title_loc_key to use to localize the title text to the user's current + # localization. + # See [Formatting and Styling](https://goo.gl/MalYE3) for more information. + # Corresponds to the JSON property `titleLocArgs` + # @return [Array] + attr_accessor :title_loc_args + + # The key to the title string in the app's string resources to use to + # localize the title text to the user's current localization. + # See [String Resources](https://goo.gl/NdFZGI) for more information. + # Corresponds to the JSON property `titleLocKey` + # @return [String] + attr_accessor :title_loc_key + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @body = args[:body] if args.key?(:body) + @body_loc_args = args[:body_loc_args] if args.key?(:body_loc_args) + @body_loc_key = args[:body_loc_key] if args.key?(:body_loc_key) + @channel_id = args[:channel_id] if args.key?(:channel_id) + @click_action = args[:click_action] if args.key?(:click_action) + @color = args[:color] if args.key?(:color) + @icon = args[:icon] if args.key?(:icon) + @sound = args[:sound] if args.key?(:sound) + @tag = args[:tag] if args.key?(:tag) + @title = args[:title] if args.key?(:title) + @title_loc_args = args[:title_loc_args] if args.key?(:title_loc_args) + @title_loc_key = args[:title_loc_key] if args.key?(:title_loc_key) + end + end + + # [Apple Push Notification Service](https://goo.gl/MXRTPa) specific options. + class ApnsConfig + include Google::Apis::Core::Hashable + + # HTTP request headers defined in Apple Push Notification Service. Refer to + # [APNs request headers](https://goo.gl/C6Yhia) for + # supported headers, e.g. "apns-priority": "10". + # Corresponds to the JSON property `headers` + # @return [Hash] + attr_accessor :headers + + # APNs payload as a JSON object, including both `aps` dictionary and custom + # payload. See [Payload Key Reference](https://goo.gl/32Pl5W). + # If present, it overrides google.firebase.fcm.v1.Notification.title + # and google.firebase.fcm.v1.Notification.body. + # Corresponds to the JSON property `payload` + # @return [Hash] + attr_accessor :payload + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @headers = args[:headers] if args.key?(:headers) + @payload = args[:payload] if args.key?(:payload) + end + end + + # Message to send by Firebase Cloud Messaging Service. + class Message + include Google::Apis::Core::Hashable + + # Android specific options for messages sent through + # [FCM connection server](https://goo.gl/4GLdUl). + # Corresponds to the JSON property `android` + # @return [Google::Apis::FcmV1::AndroidConfig] + attr_accessor :android + + # [Apple Push Notification Service](https://goo.gl/MXRTPa) specific options. + # Corresponds to the JSON property `apns` + # @return [Google::Apis::FcmV1::ApnsConfig] + attr_accessor :apns + + # Condition to send a message to, + # e.g. "'foo' in topics && 'bar' in topics". + # Corresponds to the JSON property `condition` + # @return [String] + attr_accessor :condition + + # Input only. Arbitrary key/value payload. + # Corresponds to the JSON property `data` + # @return [Hash] + attr_accessor :data + + # Output Only. The identifier of the message sent, in the format of + # `projects/*/messages/`message_id``. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Basic notification template to use across all platforms. + # Corresponds to the JSON property `notification` + # @return [Google::Apis::FcmV1::Notification] + attr_accessor :notification + + # Registration token to send a message to. + # Corresponds to the JSON property `token` + # @return [String] + attr_accessor :token + + # Topic name to send a message to, e.g. "weather". + # Note: "/topics/" prefix should not be provided. + # Corresponds to the JSON property `topic` + # @return [String] + attr_accessor :topic + + # [Webpush protocol](https://tools.ietf.org/html/rfc8030) options. + # Corresponds to the JSON property `webpush` + # @return [Google::Apis::FcmV1::WebpushConfig] + attr_accessor :webpush + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @android = args[:android] if args.key?(:android) + @apns = args[:apns] if args.key?(:apns) + @condition = args[:condition] if args.key?(:condition) + @data = args[:data] if args.key?(:data) + @name = args[:name] if args.key?(:name) + @notification = args[:notification] if args.key?(:notification) + @token = args[:token] if args.key?(:token) + @topic = args[:topic] if args.key?(:topic) + @webpush = args[:webpush] if args.key?(:webpush) + end + end + + # Basic notification template to use across all platforms. + class Notification + include Google::Apis::Core::Hashable + + # The notification's body text. + # Corresponds to the JSON property `body` + # @return [String] + attr_accessor :body + + # The notification's title. + # 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) + @body = args[:body] if args.key?(:body) + @title = args[:title] if args.key?(:title) + end + end + + # Request to send a message to specified target. + class SendMessageRequest + include Google::Apis::Core::Hashable + + # Message to send by Firebase Cloud Messaging Service. + # Corresponds to the JSON property `message` + # @return [Google::Apis::FcmV1::Message] + attr_accessor :message + + # Flag for testing the request without actually delivering the message. + # Corresponds to the JSON property `validateOnly` + # @return [Boolean] + attr_accessor :validate_only + alias_method :validate_only?, :validate_only + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @message = args[:message] if args.key?(:message) + @validate_only = args[:validate_only] if args.key?(:validate_only) + end + end + + # [Webpush protocol](https://tools.ietf.org/html/rfc8030) options. + class WebpushConfig + include Google::Apis::Core::Hashable + + # Arbitrary key/value payload. If present, it will override + # google.firebase.fcm.v1.Message.data. + # Corresponds to the JSON property `data` + # @return [Hash] + attr_accessor :data + + # Options for features provided by the FCM SDK for Web. + # Corresponds to the JSON property `fcmOptions` + # @return [Google::Apis::FcmV1::WebpushFcmOptions] + attr_accessor :fcm_options + + # HTTP headers defined in webpush protocol. Refer to + # [Webpush protocol](https://tools.ietf.org/html/rfc8030#section-5) for + # supported headers, e.g. "TTL": "15". + # Corresponds to the JSON property `headers` + # @return [Hash] + attr_accessor :headers + + # Web Notification options as a JSON object. Supports Notification instance + # properties as defined in [Web Notification + # API](https://developer.mozilla.org/en-US/docs/Web/API/Notification). If + # present, "title" and "body" fields override + # [google.firebase.fcm.v1.Notification.title] and + # [google.firebase.fcm.v1.Notification.body]. + # Corresponds to the JSON property `notification` + # @return [Hash] + attr_accessor :notification + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @data = args[:data] if args.key?(:data) + @fcm_options = args[:fcm_options] if args.key?(:fcm_options) + @headers = args[:headers] if args.key?(:headers) + @notification = args[:notification] if args.key?(:notification) + end + end + + # Options for features provided by the FCM SDK for Web. + class WebpushFcmOptions + include Google::Apis::Core::Hashable + + # The link to open when the user clicks on the notification. + # For all URL values, HTTPS is required. + # Corresponds to the JSON property `link` + # @return [String] + attr_accessor :link + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @link = args[:link] if args.key?(:link) + end + end + end + end +end diff --git a/generated/google/apis/fcm_v1/representations.rb b/generated/google/apis/fcm_v1/representations.rb new file mode 100644 index 000000000..d501c0e6f --- /dev/null +++ b/generated/google/apis/fcm_v1/representations.rb @@ -0,0 +1,167 @@ +# 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 FcmV1 + + class AndroidConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AndroidNotification + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ApnsConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Message + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Notification + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SendMessageRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class WebpushConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class WebpushFcmOptions + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AndroidConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :collapse_key, as: 'collapseKey' + hash :data, as: 'data' + property :notification, as: 'notification', class: Google::Apis::FcmV1::AndroidNotification, decorator: Google::Apis::FcmV1::AndroidNotification::Representation + + property :priority, as: 'priority' + property :restricted_package_name, as: 'restrictedPackageName' + property :ttl, as: 'ttl' + end + end + + class AndroidNotification + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :body, as: 'body' + collection :body_loc_args, as: 'bodyLocArgs' + property :body_loc_key, as: 'bodyLocKey' + property :channel_id, as: 'channelId' + property :click_action, as: 'clickAction' + property :color, as: 'color' + property :icon, as: 'icon' + property :sound, as: 'sound' + property :tag, as: 'tag' + property :title, as: 'title' + collection :title_loc_args, as: 'titleLocArgs' + property :title_loc_key, as: 'titleLocKey' + end + end + + class ApnsConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + hash :headers, as: 'headers' + hash :payload, as: 'payload' + end + end + + class Message + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :android, as: 'android', class: Google::Apis::FcmV1::AndroidConfig, decorator: Google::Apis::FcmV1::AndroidConfig::Representation + + property :apns, as: 'apns', class: Google::Apis::FcmV1::ApnsConfig, decorator: Google::Apis::FcmV1::ApnsConfig::Representation + + property :condition, as: 'condition' + hash :data, as: 'data' + property :name, as: 'name' + property :notification, as: 'notification', class: Google::Apis::FcmV1::Notification, decorator: Google::Apis::FcmV1::Notification::Representation + + property :token, as: 'token' + property :topic, as: 'topic' + property :webpush, as: 'webpush', class: Google::Apis::FcmV1::WebpushConfig, decorator: Google::Apis::FcmV1::WebpushConfig::Representation + + end + end + + class Notification + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :body, as: 'body' + property :title, as: 'title' + end + end + + class SendMessageRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :message, as: 'message', class: Google::Apis::FcmV1::Message, decorator: Google::Apis::FcmV1::Message::Representation + + property :validate_only, as: 'validateOnly' + end + end + + class WebpushConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + hash :data, as: 'data' + property :fcm_options, as: 'fcmOptions', class: Google::Apis::FcmV1::WebpushFcmOptions, decorator: Google::Apis::FcmV1::WebpushFcmOptions::Representation + + hash :headers, as: 'headers' + hash :notification, as: 'notification' + end + end + + class WebpushFcmOptions + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :link, as: 'link' + end + end + end + end +end diff --git a/generated/google/apis/fcm_v1/service.rb b/generated/google/apis/fcm_v1/service.rb new file mode 100644 index 000000000..fca206038 --- /dev/null +++ b/generated/google/apis/fcm_v1/service.rb @@ -0,0 +1,97 @@ +# 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 FcmV1 + # Firebase Cloud Messaging API + # + # FCM send API that provides a cross-platform messaging solution to reliably + # deliver messages at no cost. + # + # @example + # require 'google/apis/fcm_v1' + # + # Fcm = Google::Apis::FcmV1 # Alias the module + # service = Fcm::FirebaseCloudMessagingService.new + # + # @see https://firebase.google.com/docs/cloud-messaging + class FirebaseCloudMessagingService < 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. + attr_accessor :quota_user + + def initialize + super('https://fcm.googleapis.com/', '') + @batch_path = 'batch' + end + + # Send a message to specified target (a registration token, topic + # or condition). + # @param [String] parent + # Required. It contains the Firebase project id (i.e. the unique identifier + # for your Firebase project), in the format of `projects/`project_id``. + # For legacy support, the numeric project number with no padding is also + # supported in the format of `projects/`project_number``. + # @param [Google::Apis::FcmV1::SendMessageRequest] send_message_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::FcmV1::Message] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::FcmV1::Message] + # + # @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 send_message(parent, send_message_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+parent}/messages:send', options) + command.request_representation = Google::Apis::FcmV1::SendMessageRequest::Representation + command.request_object = send_message_request_object + command.response_representation = Google::Apis::FcmV1::Message::Representation + command.response_class = Google::Apis::FcmV1::Message + 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['key'] = key unless key.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + end + end + end + end +end diff --git a/generated/google/apis/file_v1.rb b/generated/google/apis/file_v1.rb index f33423509..e87e7d7d4 100644 --- a/generated/google/apis/file_v1.rb +++ b/generated/google/apis/file_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/filestore/ module FileV1 VERSION = 'V1' - REVISION = '20190430' + REVISION = '20190516' # 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/file_v1/classes.rb b/generated/google/apis/file_v1/classes.rb index be86c6fc7..d0b79917c 100644 --- a/generated/google/apis/file_v1/classes.rb +++ b/generated/google/apis/file_v1/classes.rb @@ -135,6 +135,24 @@ module Google # b/instances/vm-1", # ` # ], + # "maintenance_schedules": ` + # "csa_rollout": ` + # "start_time": ` + # "seconds": 1526406431, + # `, + # "end_time": ` + # "seconds": 1535406431, + # `, + # `, + # "ncsa_rollout": ` + # "start_time": ` + # "seconds": 1526406431, + # `, + # "end_time": ` + # "seconds": 1535406431, + # `, + # ` + # ` # ` # ``` class GoogleCloudSaasacceleratorManagementProvidersV1Instance @@ -161,6 +179,12 @@ module Google # @return [Hash] attr_accessor :maintenance_policy_names + # The MaintenanceSchedule contains the scheduling information of published + # maintenance schedule. + # Corresponds to the JSON property `maintenanceSchedules` + # @return [Hash] + attr_accessor :maintenance_schedules + # Unique name of the resource. It uses the form: # `projects/`project_id`/locations/`location_id`/instances/`instance_id`` # Corresponds to the JSON property `name` @@ -228,6 +252,7 @@ module Google @create_time = args[:create_time] if args.key?(:create_time) @labels = args[:labels] if args.key?(:labels) @maintenance_policy_names = args[:maintenance_policy_names] if args.key?(:maintenance_policy_names) + @maintenance_schedules = args[:maintenance_schedules] if args.key?(:maintenance_schedules) @name = args[:name] if args.key?(:name) @producer_metadata = args[:producer_metadata] if args.key?(:producer_metadata) @provisioned_resources = args[:provisioned_resources] if args.key?(:provisioned_resources) @@ -240,6 +265,32 @@ module Google end end + # Maintenance schedule which is exposed to customer and potentially end user, + # indicating published upcoming future maintenance schedule + class GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSchedule + include Google::Apis::Core::Hashable + + # The scheduled end time for the maintenance. + # Corresponds to the JSON property `endTime` + # @return [String] + attr_accessor :end_time + + # The scheduled start time for the maintenance. + # Corresponds to the JSON property `startTime` + # @return [String] + attr_accessor :start_time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @end_time = args[:end_time] if args.key?(:end_time) + @start_time = args[:start_time] if args.key?(:start_time) + end + end + # Node information for custom per-node SLO implementations. # SSA does not support per-node SLO, but producers can populate per-node # information in SloMetadata for custom precomputations. @@ -801,7 +852,7 @@ module Google # The server-assigned name, which is only unique within the same service that # originally returns it. If you use the default HTTP mapping, the - # `name` should have the format of `operations/some/unique/name`. + # `name` should be a resource name ending with `operations/`unique_id``. # Corresponds to the JSON property `name` # @return [String] attr_accessor :name diff --git a/generated/google/apis/file_v1/representations.rb b/generated/google/apis/file_v1/representations.rb index a27c8c5d8..99436674c 100644 --- a/generated/google/apis/file_v1/representations.rb +++ b/generated/google/apis/file_v1/representations.rb @@ -46,6 +46,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSchedule + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class GoogleCloudSaasacceleratorManagementProvidersV1NodeSloMetadata class Representation < Google::Apis::Core::JsonRepresentation; end @@ -162,6 +168,8 @@ module Google property :create_time, as: 'createTime' hash :labels, as: 'labels' hash :maintenance_policy_names, as: 'maintenancePolicyNames' + hash :maintenance_schedules, as: 'maintenanceSchedules', class: Google::Apis::FileV1::GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSchedule, decorator: Google::Apis::FileV1::GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSchedule::Representation + property :name, as: 'name' hash :producer_metadata, as: 'producerMetadata' collection :provisioned_resources, as: 'provisionedResources', class: Google::Apis::FileV1::GoogleCloudSaasacceleratorManagementProvidersV1ProvisionedResource, decorator: Google::Apis::FileV1::GoogleCloudSaasacceleratorManagementProvidersV1ProvisionedResource::Representation @@ -177,6 +185,14 @@ module Google end end + class GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSchedule + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :end_time, as: 'endTime' + property :start_time, as: 'startTime' + end + end + class GoogleCloudSaasacceleratorManagementProvidersV1NodeSloMetadata # @private class Representation < Google::Apis::Core::JsonRepresentation diff --git a/generated/google/apis/file_v1beta1.rb b/generated/google/apis/file_v1beta1.rb index 690c6d36e..687ee2ed5 100644 --- a/generated/google/apis/file_v1beta1.rb +++ b/generated/google/apis/file_v1beta1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/filestore/ module FileV1beta1 VERSION = 'V1beta1' - REVISION = '20190430' + REVISION = '20190516' # 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/file_v1beta1/classes.rb b/generated/google/apis/file_v1beta1/classes.rb index 789044b10..e4ac64ec9 100644 --- a/generated/google/apis/file_v1beta1/classes.rb +++ b/generated/google/apis/file_v1beta1/classes.rb @@ -135,6 +135,24 @@ module Google # b/instances/vm-1", # ` # ], + # "maintenance_schedules": ` + # "csa_rollout": ` + # "start_time": ` + # "seconds": 1526406431, + # `, + # "end_time": ` + # "seconds": 1535406431, + # `, + # `, + # "ncsa_rollout": ` + # "start_time": ` + # "seconds": 1526406431, + # `, + # "end_time": ` + # "seconds": 1535406431, + # `, + # ` + # ` # ` # ``` class GoogleCloudSaasacceleratorManagementProvidersV1Instance @@ -161,6 +179,12 @@ module Google # @return [Hash] attr_accessor :maintenance_policy_names + # The MaintenanceSchedule contains the scheduling information of published + # maintenance schedule. + # Corresponds to the JSON property `maintenanceSchedules` + # @return [Hash] + attr_accessor :maintenance_schedules + # Unique name of the resource. It uses the form: # `projects/`project_id`/locations/`location_id`/instances/`instance_id`` # Corresponds to the JSON property `name` @@ -228,6 +252,7 @@ module Google @create_time = args[:create_time] if args.key?(:create_time) @labels = args[:labels] if args.key?(:labels) @maintenance_policy_names = args[:maintenance_policy_names] if args.key?(:maintenance_policy_names) + @maintenance_schedules = args[:maintenance_schedules] if args.key?(:maintenance_schedules) @name = args[:name] if args.key?(:name) @producer_metadata = args[:producer_metadata] if args.key?(:producer_metadata) @provisioned_resources = args[:provisioned_resources] if args.key?(:provisioned_resources) @@ -240,6 +265,32 @@ module Google end end + # Maintenance schedule which is exposed to customer and potentially end user, + # indicating published upcoming future maintenance schedule + class GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSchedule + include Google::Apis::Core::Hashable + + # The scheduled end time for the maintenance. + # Corresponds to the JSON property `endTime` + # @return [String] + attr_accessor :end_time + + # The scheduled start time for the maintenance. + # Corresponds to the JSON property `startTime` + # @return [String] + attr_accessor :start_time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @end_time = args[:end_time] if args.key?(:end_time) + @start_time = args[:start_time] if args.key?(:start_time) + end + end + # Node information for custom per-node SLO implementations. # SSA does not support per-node SLO, but producers can populate per-node # information in SloMetadata for custom precomputations. @@ -801,7 +852,7 @@ module Google # The server-assigned name, which is only unique within the same service that # originally returns it. If you use the default HTTP mapping, the - # `name` should have the format of `operations/some/unique/name`. + # `name` should be a resource name ending with `operations/`unique_id``. # Corresponds to the JSON property `name` # @return [String] attr_accessor :name diff --git a/generated/google/apis/file_v1beta1/representations.rb b/generated/google/apis/file_v1beta1/representations.rb index 8d8526adf..52ecc2996 100644 --- a/generated/google/apis/file_v1beta1/representations.rb +++ b/generated/google/apis/file_v1beta1/representations.rb @@ -46,6 +46,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSchedule + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class GoogleCloudSaasacceleratorManagementProvidersV1NodeSloMetadata class Representation < Google::Apis::Core::JsonRepresentation; end @@ -162,6 +168,8 @@ module Google property :create_time, as: 'createTime' hash :labels, as: 'labels' hash :maintenance_policy_names, as: 'maintenancePolicyNames' + hash :maintenance_schedules, as: 'maintenanceSchedules', class: Google::Apis::FileV1beta1::GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSchedule, decorator: Google::Apis::FileV1beta1::GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSchedule::Representation + property :name, as: 'name' hash :producer_metadata, as: 'producerMetadata' collection :provisioned_resources, as: 'provisionedResources', class: Google::Apis::FileV1beta1::GoogleCloudSaasacceleratorManagementProvidersV1ProvisionedResource, decorator: Google::Apis::FileV1beta1::GoogleCloudSaasacceleratorManagementProvidersV1ProvisionedResource::Representation @@ -177,6 +185,14 @@ module Google end end + class GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSchedule + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :end_time, as: 'endTime' + property :start_time, as: 'startTime' + end + end + class GoogleCloudSaasacceleratorManagementProvidersV1NodeSloMetadata # @private class Representation < Google::Apis::Core::JsonRepresentation diff --git a/generated/google/apis/monitoring_v3.rb b/generated/google/apis/monitoring_v3.rb index e6ae79038..09eb566a9 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 = '20190503' + REVISION = '20190511' # 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/monitoring_v3/classes.rb b/generated/google/apis/monitoring_v3/classes.rb index 4d81cdfcb..025f1b24e 100644 --- a/generated/google/apis/monitoring_v3/classes.rb +++ b/generated/google/apis/monitoring_v3/classes.rb @@ -1202,7 +1202,7 @@ module Google end # An internal checker allows uptime checks to run on private/internal GCP - # resources.DEPRECATED. Use PrivateChecker instead. + # resources. class InternalChecker include Google::Apis::Core::Hashable @@ -1735,6 +1735,11 @@ module Google # @return [Array] attr_accessor :labels + # Optional. The launch stage of the metric definition. + # Corresponds to the JSON property `launchStage` + # @return [String] + attr_accessor :launch_stage + # Additional annotations that can be used to guide the usage of a metric. # Corresponds to the JSON property `metadata` # @return [Google::Apis::MonitoringV3::MetricDescriptorMetadata] @@ -1829,6 +1834,7 @@ module Google @description = args[:description] if args.key?(:description) @display_name = args[:display_name] if args.key?(:display_name) @labels = args[:labels] if args.key?(:labels) + @launch_stage = args[:launch_stage] if args.key?(:launch_stage) @metadata = args[:metadata] if args.key?(:metadata) @metric_kind = args[:metric_kind] if args.key?(:metric_kind) @name = args[:name] if args.key?(:name) @@ -1849,7 +1855,8 @@ module Google # @return [String] attr_accessor :ingest_delay - # The launch stage of the metric definition. + # Deprecated. Please use the MetricDescriptor.launch_stage instead. The launch + # stage of the metric definition. # Corresponds to the JSON property `launchStage` # @return [String] attr_accessor :launch_stage diff --git a/generated/google/apis/monitoring_v3/representations.rb b/generated/google/apis/monitoring_v3/representations.rb index 6e0cb6662..5d0bd36c6 100644 --- a/generated/google/apis/monitoring_v3/representations.rb +++ b/generated/google/apis/monitoring_v3/representations.rb @@ -829,6 +829,7 @@ module Google property :display_name, as: 'displayName' collection :labels, as: 'labels', class: Google::Apis::MonitoringV3::LabelDescriptor, decorator: Google::Apis::MonitoringV3::LabelDescriptor::Representation + property :launch_stage, as: 'launchStage' property :metadata, as: 'metadata', class: Google::Apis::MonitoringV3::MetricDescriptorMetadata, decorator: Google::Apis::MonitoringV3::MetricDescriptorMetadata::Representation property :metric_kind, as: 'metricKind' diff --git a/generated/google/apis/people_v1.rb b/generated/google/apis/people_v1.rb index fd2f8a292..5753d9567 100644 --- a/generated/google/apis/people_v1.rb +++ b/generated/google/apis/people_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/people/ module PeopleV1 VERSION = 'V1' - REVISION = '20190422' + REVISION = '20190516' # See, edit, download, and permanently delete your contacts AUTH_CONTACTS = 'https://www.googleapis.com/auth/contacts' diff --git a/generated/google/apis/servicemanagement_v1.rb b/generated/google/apis/servicemanagement_v1.rb index 9d09df9c5..9cbefe415 100644 --- a/generated/google/apis/servicemanagement_v1.rb +++ b/generated/google/apis/servicemanagement_v1.rb @@ -27,7 +27,7 @@ module Google # @see https://cloud.google.com/service-management/ module ServicemanagementV1 VERSION = 'V1' - REVISION = '20190502' + REVISION = '20190510' # 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/servicemanagement_v1/classes.rb b/generated/google/apis/servicemanagement_v1/classes.rb index 4b08216f6..0211803c9 100644 --- a/generated/google/apis/servicemanagement_v1/classes.rb +++ b/generated/google/apis/servicemanagement_v1/classes.rb @@ -452,32 +452,6 @@ module Google end end - # Configuration of authorization. - # This section determines the authorization provider, if unspecified, then no - # authorization check will be done. - # Example: - # experimental: - # authorization: - # provider: firebaserules.googleapis.com - class AuthorizationConfig - include Google::Apis::Core::Hashable - - # The name of the authorization provider, such as - # firebaserules.googleapis.com. - # Corresponds to the JSON property `provider` - # @return [String] - attr_accessor :provider - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @provider = args[:provider] if args.key?(:provider) - end - end - # `Backend` defines the backend configuration for a service. class Backend include Google::Apis::Core::Hashable @@ -1421,32 +1395,6 @@ module Google end end - # Experimental service configuration. These configuration options can - # only be used by whitelisted users. - class Experimental - include Google::Apis::Core::Hashable - - # Configuration of authorization. - # This section determines the authorization provider, if unspecified, then no - # authorization check will be done. - # Example: - # experimental: - # authorization: - # provider: firebaserules.googleapis.com - # Corresponds to the JSON property `authorization` - # @return [Google::Apis::ServicemanagementV1::AuthorizationConfig] - attr_accessor :authorization - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @authorization = args[:authorization] if args.key?(:authorization) - end - end - # Represents an expression text. Example: # title: "User account presence" # description: "Determines whether the request has a user account" @@ -2403,6 +2351,11 @@ module Google # @return [Array] attr_accessor :labels + # Optional. The launch stage of the metric definition. + # Corresponds to the JSON property `launchStage` + # @return [String] + attr_accessor :launch_stage + # Additional annotations that can be used to guide the usage of a metric. # Corresponds to the JSON property `metadata` # @return [Google::Apis::ServicemanagementV1::MetricDescriptorMetadata] @@ -2501,6 +2454,7 @@ module Google @description = args[:description] if args.key?(:description) @display_name = args[:display_name] if args.key?(:display_name) @labels = args[:labels] if args.key?(:labels) + @launch_stage = args[:launch_stage] if args.key?(:launch_stage) @metadata = args[:metadata] if args.key?(:metadata) @metric_kind = args[:metric_kind] if args.key?(:metric_kind) @name = args[:name] if args.key?(:name) @@ -2521,6 +2475,7 @@ module Google # @return [String] attr_accessor :ingest_delay + # Deprecated. Please use the MetricDescriptor.launch_stage instead. # The launch stage of the metric definition. # Corresponds to the JSON property `launchStage` # @return [String] @@ -2932,7 +2887,7 @@ module Google # The server-assigned name, which is only unique within the same service that # originally returns it. If you use the default HTTP mapping, the - # `name` should have the format of `operations/some/unique/name`. + # `name` should be a resource name ending with `operations/`unique_id``. # Corresponds to the JSON property `name` # @return [String] attr_accessor :name @@ -3642,12 +3597,6 @@ module Google # @return [Array] attr_accessor :enums - # Experimental service configuration. These configuration options can - # only be used by whitelisted users. - # Corresponds to the JSON property `experimental` - # @return [Google::Apis::ServicemanagementV1::Experimental] - attr_accessor :experimental - # Defines the HTTP configuration for an API service. It contains a list of # HttpRule, each specifying the mapping of an RPC method # to one or more HTTP REST API methods. @@ -3866,7 +3815,6 @@ module Google @documentation = args[:documentation] if args.key?(:documentation) @endpoints = args[:endpoints] if args.key?(:endpoints) @enums = args[:enums] if args.key?(:enums) - @experimental = args[:experimental] if args.key?(:experimental) @http = args[:http] if args.key?(:http) @id = args[:id] if args.key?(:id) @logging = args[:logging] if args.key?(:logging) diff --git a/generated/google/apis/servicemanagement_v1/representations.rb b/generated/google/apis/servicemanagement_v1/representations.rb index d1533753c..b8a126bf6 100644 --- a/generated/google/apis/servicemanagement_v1/representations.rb +++ b/generated/google/apis/servicemanagement_v1/representations.rb @@ -70,12 +70,6 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class AuthorizationConfig - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class Backend class Representation < Google::Apis::Core::JsonRepresentation; end @@ -226,12 +220,6 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class Experimental - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class Expr class Representation < Google::Apis::Core::JsonRepresentation; end @@ -626,13 +614,6 @@ module Google end end - class AuthorizationConfig - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :provider, as: 'provider' - end - end - class Backend # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -862,14 +843,6 @@ module Google end end - class Experimental - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :authorization, as: 'authorization', class: Google::Apis::ServicemanagementV1::AuthorizationConfig, decorator: Google::Apis::ServicemanagementV1::AuthorizationConfig::Representation - - end - end - class Expr # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1061,6 +1034,7 @@ module Google property :display_name, as: 'displayName' collection :labels, as: 'labels', class: Google::Apis::ServicemanagementV1::LabelDescriptor, decorator: Google::Apis::ServicemanagementV1::LabelDescriptor::Representation + property :launch_stage, as: 'launchStage' property :metadata, as: 'metadata', class: Google::Apis::ServicemanagementV1::MetricDescriptorMetadata, decorator: Google::Apis::ServicemanagementV1::MetricDescriptorMetadata::Representation property :metric_kind, as: 'metricKind' @@ -1252,8 +1226,6 @@ module Google collection :enums, as: 'enums', class: Google::Apis::ServicemanagementV1::Enum, decorator: Google::Apis::ServicemanagementV1::Enum::Representation - property :experimental, as: 'experimental', class: Google::Apis::ServicemanagementV1::Experimental, decorator: Google::Apis::ServicemanagementV1::Experimental::Representation - property :http, as: 'http', class: Google::Apis::ServicemanagementV1::Http, decorator: Google::Apis::ServicemanagementV1::Http::Representation property :id, as: 'id'