Class: Google::Apis::RetailV2::GoogleCloudRetailV2SetDefaultBranchRequest

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/retail_v2/classes.rb,
lib/google/apis/retail_v2/representations.rb,
lib/google/apis/retail_v2/representations.rb

Overview

Request message to set a specified branch as new default_branch.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRetailV2SetDefaultBranchRequest

Returns a new instance of GoogleCloudRetailV2SetDefaultBranchRequest.



3077
3078
3079
# File 'lib/google/apis/retail_v2/classes.rb', line 3077

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#branch_idString

The final component of the resource name of a branch. This field must be one of "0", "1" or "2". Otherwise, an INVALID_ARGUMENT error is returned. If there are no sufficient active products in the targeted branch and force is not set, a FAILED_PRECONDITION error is returned. Corresponds to the JSON property branchId

Returns:

  • (String)


3060
3061
3062
# File 'lib/google/apis/retail_v2/classes.rb', line 3060

def branch_id
  @branch_id
end

#forceBoolean Also known as: force?

If set to true, it permits switching to a branch with branch_id even if it has no sufficient active products. Corresponds to the JSON property force

Returns:

  • (Boolean)


3066
3067
3068
# File 'lib/google/apis/retail_v2/classes.rb', line 3066

def force
  @force
end

#noteString

Some note on this request, this can be retrieved by CatalogService. GetDefaultBranch before next valid default branch set occurs. This field must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponds to the JSON property note

Returns:

  • (String)


3075
3076
3077
# File 'lib/google/apis/retail_v2/classes.rb', line 3075

def note
  @note
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3082
3083
3084
3085
3086
# File 'lib/google/apis/retail_v2/classes.rb', line 3082

def update!(**args)
  @branch_id = args[:branch_id] if args.key?(:branch_id)
  @force = args[:force] if args.key?(:force)
  @note = args[:note] if args.key?(:note)
end