Skip to content

Commit 11feef4

Browse files
committed
OCM-8260 | feat: bump model to v0.0.374 and include access transparency examples
1 parent 44af134 commit 11feef4

File tree

67 files changed

+10006
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+10006
-2
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export PATH := $(LOCAL_BIN_PATH):$(PATH)
2727
export CGO_ENABLED=0
2828

2929
# Details of the model to use:
30-
model_version:=v0.0.373
30+
model_version:=v0.0.374
3131
model_url:=https://github.com/openshift-online/ocm-api-model.git
3232

3333
# Details of the metamodel to use:

accesstransparency/client.go

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/*
2+
Copyright (c) 2020 Red Hat, Inc.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
// IMPORTANT: This file has been generated automatically, refrain from modifying it manually as all
18+
// your changes will be lost when the file is generated again.
19+
20+
package accesstransparency // github.com/openshift-online/ocm-sdk-go/accesstransparency
21+
22+
import (
23+
"net/http"
24+
"path"
25+
26+
v1 "github.com/openshift-online/ocm-sdk-go/accesstransparency/v1"
27+
)
28+
29+
// Client is the client for service 'access_transparency'.
30+
type Client struct {
31+
transport http.RoundTripper
32+
path string
33+
}
34+
35+
// NewClient creates a new client for the service 'access_transparency' using the
36+
// given transport to send the requests and receive the responses.
37+
func NewClient(transport http.RoundTripper, path string) *Client {
38+
client := new(Client)
39+
client.transport = transport
40+
client.path = path
41+
return client
42+
}
43+
44+
// V1 returns a reference to a client for version 'v1'.
45+
func (c *Client) V1() *v1.Client {
46+
return v1.NewClient(
47+
c.transport,
48+
path.Join(c.path, "v1"),
49+
)
50+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
/*
2+
Copyright (c) 2020 Red Hat, Inc.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
// IMPORTANT: This file has been generated automatically, refrain from modifying it manually as all
18+
// your changes will be lost when the file is generated again.
19+
20+
package v1 // github.com/openshift-online/ocm-sdk-go/accesstransparency/v1
21+
22+
// AccessProtectionBuilder contains the data and logic needed to build 'access_protection' objects.
23+
//
24+
// Representation of an access protection.
25+
type AccessProtectionBuilder struct {
26+
bitmap_ uint32
27+
enabled bool
28+
}
29+
30+
// NewAccessProtection creates a new builder of 'access_protection' objects.
31+
func NewAccessProtection() *AccessProtectionBuilder {
32+
return &AccessProtectionBuilder{}
33+
}
34+
35+
// Empty returns true if the builder is empty, i.e. no attribute has a value.
36+
func (b *AccessProtectionBuilder) Empty() bool {
37+
return b == nil || b.bitmap_ == 0
38+
}
39+
40+
// Enabled sets the value of the 'enabled' attribute to the given value.
41+
func (b *AccessProtectionBuilder) Enabled(value bool) *AccessProtectionBuilder {
42+
b.enabled = value
43+
b.bitmap_ |= 1
44+
return b
45+
}
46+
47+
// Copy copies the attributes of the given object into this builder, discarding any previous values.
48+
func (b *AccessProtectionBuilder) Copy(object *AccessProtection) *AccessProtectionBuilder {
49+
if object == nil {
50+
return b
51+
}
52+
b.bitmap_ = object.bitmap_
53+
b.enabled = object.enabled
54+
return b
55+
}
56+
57+
// Build creates a 'access_protection' object using the configuration stored in the builder.
58+
func (b *AccessProtectionBuilder) Build() (object *AccessProtection, err error) {
59+
object = new(AccessProtection)
60+
object.bitmap_ = b.bitmap_
61+
object.enabled = b.enabled
62+
return
63+
}

0 commit comments

Comments
 (0)