Do executes the "firebaserules.projects.releases.create" call. Exactly one of *Release or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Release.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

Do is referenced in 0 repositories


// Once a `Release` refers to a `Ruleset`, the rules can be enforced
// by
// Firebase Rules-enabled services.
// More than one `Release` may be 'live' concurrently. Consider the
// following
// three `Release` names for `projects/foo` and the `Ruleset` to which
// they
// refer.
// Release Name                    | Ruleset
// Name
// --------------------------------|-------------
// projects/foo/relea
// ses/prod      |
// projects/foo/rulesets/uuid123
// projects/foo/releases/prod/beta |
// projects/foo/rulesets/uuid123
// projects/foo/releases/prod/v23  | projects/foo/rulesets/uuid456
// The table reflects the `Ruleset` rollout in progress. The `prod`
// and
// `prod/beta` releases refer to the same `Ruleset`. However,
// `prod/v23`
// refers to a new `Ruleset`. The `Ruleset` reference for a `Release`
// may be
// updated using the UpdateRelease method, and the custom `Release`
// name
// may be referenced by specifying the `X-Firebase-Rules-Release-Name`
// header.
func (r *ProjectsReleasesService) Create(name string, release *Release) *ProjectsReleasesCreateCall {
	c := &ProjectsReleasesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} = name
	c.release = release
	return c

// Fields allows partial responses to be retrieved. See
// for more information.
func (c *ProjectsReleasesCreateCall) Fields(s ...googleapi.Field) *ProjectsReleasesCreateCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c

// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *ProjectsReleasesCreateCall) Context(ctx context.Context) *ProjectsReleasesCreateCall {
	c.ctx_ = ctx
	return c

func (c *ProjectsReleasesCreateCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := make(http.Header)
	reqHeaders.Set("User-Agent", c.s.userAgent())
	var body io.Reader = nil
	body, err := googleapi.WithoutDataWrapper.JSONReader(c.release)
	if err != nil {
		return nil, err