class Google::Cloud::Bigquery::Condition


Used to define condition for {Dataset::Access} rules
at github.com/google/cel-spec<br>CEL is a C-like expression language. The syntax and semantics of CEL are documented
Represents a textual expression in the Common Expression Language (CEL) syntax.
# Condition
#

def description

Returns:
  • (String, nil) - The description of the condition. nil if not set.
def description
  @description
end

def description= val

Parameters:
  • val (String, nil) -- The description to set. nil to unset.
def description= val
  @description = val
end

def expression

Returns:
  • (String) - The expression of the condition.
def expression
  @expression
end

def expression= val

Raises:
  • (ArgumentError) - if the expression is nil or empty.

Parameters:
  • val (String) -- The expression to set.
def expression= val
  if val.nil? || val.strip.empty?
    raise ArgumentError, "Expression cannot be nil or empty"
  end
  @expression = val
end

def initialize expression, description: nil, location: nil, title: nil

Other tags:
    See: https://cloud.google.com/bigquery/docs/reference/auditlogs/rest/Shared.Types/Expr -

Raises:
  • (ArgumentError) - if expression is nil or empty.

Parameters:
  • title (String) -- Optional title for the expression.
  • location (String) -- Optional location of the expression for error reporting.
  • description (String) -- Optional description of the expression.
  • expression (String) -- The expression in CEL syntax.
def initialize expression, description: nil, location: nil, title: nil
  if expression.nil? || expression.strip.empty?
    raise ArgumentError, "Expression cannot be nil or empty"
  end
  @expression = expression
  @description = description
  @location = location
  @title = title
end

def location

Returns:
  • (String, nil) - The location of the condition. nil if not set.
def location
  @location
end

def location= val

Parameters:
  • val (String, nil) -- The location to set. nil to unset.
def location= val
  @location = val
end

def title

Returns:
  • (String, nil) - The title of the condition. nil if not set.
def title
  @title
end

def title= val

Parameters:
  • val (String, nil) -- The title to set. nil to unset.
def title= val
  @title = val
end

def to_gapi

Other tags:
    See: https://cloud.google.com/bigquery/docs/reference/auditlogs/rest/Shared.Types/Expr -

Returns:
  • (Google::Apis::BigqueryV2::Expr) - The Google API Client object representing the condition.

Other tags:
    Private: - Convert the Condition object to a Google API Client object.
def to_gapi
  gapi = Google::Apis::BigqueryV2::Expr.new
  gapi.description = @description unless @description.nil?
  gapi.expression = @expression
  gapi.location = @location unless @location.nil?
  gapi.title = @title unless @title.nil?
  gapi
end